Docker is a bit like virtual machine technology. The virtual machine simulates all or part of the hardware, has a complete set of its own operating system, and docker is not, it is just a process, this process is called container, this is called container technology, or isolation technology, It does not start an operating system again, because it is too resource-intensive and too slow. It isolates the Linux kernel and has its own space, for example, its own root account and disk status. It is very lightweight and starts up very quickly. A machine can start many docker container processes.
Talk about a few application scenarios, you have no reason not to use it.
- Front-end engineer, do not understand the development environment for configuring php or java
- Continuous integration testing
- Rapid deployment, one command, the same environment for deployment
- As a nodejs programmer, don't know php or ruby, want to deploy the application they write, a command
- Convenient resource configuration for programs, such as process monitoring, memory limitations
- Installing the software is too slow, such as installing mongodb, it takes a long time to download it, and docker can run with only one command.
Install under mac
Click here to download the latest mac version installer.
Click the installation package to download and run.
Install under linux
Just one command.
Curl -sSL https://get.daocloud.io/docker | sh
This command can successfully install docker on both ubuntu 14.04 and ubuntu 16.04.
After the installation is complete, you may be prompted with such information:
If you would like to use Docker as a non-root user, you should now consider Adding your user to the "docker" group with something like: Sudo usermod -aG docker vagrant Remember that you will have log to and back in for this to take effect!
Vagrant is your username, maybe your username is different from mine.
This means that you can add the current user to the docker group. It is much more convenient to manage the docker in the future. Otherwise, you may need to add sudo in front before using the docker command.
If you don't add sudo, it's a hint like this:
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.26/containers/json: dial unix /var/run/docker.sock: connect: permission denied
However, after executing sudo usermod -aG docker vagrant, you can re-login (ssh), you can avoid adding sudo.
The installation is successful, you need to start the docker service:
If it is a ubuntu 14.04 system, it will start automatically, you can also use the following command to start.
$ sudo /etc/init.d/docker start
If it is a ubuntu 16.04 system, use the following command:
$ sudo systemctl status docker.service