First contact with Docker, completely do not know how to install, and do not want to use a physical machine to experiment (mainly afraid of what problem = =), so in the virtual machine's Ubuntu system to try to install.
Various Baidu, Google looking for Docker installation tutorial, finally found the normal installation steps are as follows:
1. Execute the following command to install the optional kernel module package
$ sudo apt-get update$ sudo apt-get install\linux-image-extra-$ (uname-r) \linux-image-extra-virtual
2. Install using apt image source
$ sudo apt-get update$ sudo apt-get install \apt-transport-https \ca-certificates \curl \software-properties-common
3. Use domestic sources (faster)
① Adding a GPG key for a software source
$ Curl-fssl HTTPS://MIRRORS.ALIYUN.COM/DOCKER-CE/LINUX/UBUNTU/GPG | sudo apt-key add-
② Adding a Docker software source
$ sudo add-apt-repository \ "Deb [ARCH=AMD64] https://mirrors.aliyun.com/docker-ce/linux/ubuntu \ $ (LSB_RELEASE-CS) Stable
4. Installing Docker
$ sudo apt-get update$ sudo apt-get install Docker-ce
5. Automatic installation using scripts
$ curl-fssl get.docker.com-o get-docker.sh$ sudo sh get-docker.sh--mirror Aliyun
6. Start Docker
$ sudo systemctl enable docker$ sudo systemctl start docker
The start command for Ubuntu14.04 is
$ sudo service docker start
to here theoretically has been able to experience Docker happily, but I in the building environment always meet the online can find all the problems of the spirit, sure enough in the first step when there has been a problem, in the execution of the second command, the prompt:
650) this.width=650; "src=" Https://s1.51cto.com/oss/201710/31/243e09494436a88e635ffd11facc6e40.png "title=" 001_. PNG "alt=" 243e09494436a88e635ffd11facc6e40.png "/>
Very desperate Ah, and then began to find a solution to this problem, then the goose nothing, and then began to engage in random mode, directly in the terminal input Docker, enter, incredibly magically appear
650) this.width=650; "src=" Https://s1.51cto.com/oss/201710/31/0c43f6d8c87489107d2dcd8c65bf8cb1.png "title=" 002_. PNG "alt=" 0c43f6d8c87489107d2dcd8c65bf8cb1.png "/>
Look at this sentence, I inside cow face, feel like a fool, but still very excited, decisive input command:
sudo apt install Docker.io
Then there will be a prompt to continue the information, enter Yes, carriage return, static and so on after the command is OK
After the installation is complete, re-enter: Docker at the terminal, and the information that appears is a variety of tips:
650) this.width=650; "src=" Https://s1.51cto.com/oss/201710/31/843c676b1baee7a295a3359c858019ba.png "title=" 003_. PNG "alt=" 843c676b1baee7a295a3359c858019ba.png "/>
It's not easy ^_^ But the result is still good. It may be because the Ubuntu version is constantly upgrading, so you can have this kind of operation
This article is from the "Guardian" blog, please be sure to keep this source http://acevi.blog.51cto.com/13261784/1977916
Installing Docker in a Linux environment