Ubuntu下安装Docker CE
官网配置步骤:https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-docker-ce-1
安装Docker社区版仓库
-
Update the
apt
package index:$ sudo apt-get update
-
Install packages to allow
apt
to use a repository over HTTPS:$ sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ software-properties-common
-
Add Docker’s official GPG key:
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
-
Use the following command to set up the stable repository. You always need the stable repository, even if you want to install builds from the edge or test repositories as well. To add the edge or test repository, add the word
edge
ortest
(or both) after the wordstable
in the commands below.$ sudo add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \ stable"
安装Docker社区版
-
Update the
apt
package index.$ sudo apt-get update
-
Install the latest version of Docker CE, or go to the next step to install a specific version:
$ sudo apt-get install docker-ce
3.Verify that Docker CE is installed correctly by running the hello-world
image.
$ sudo docker run hello-world
截图如下
![](https://images2018.cnblogs.com/blog/757779/201806/757779-20180606102601627-1444279231.png)
![](https://images2018.cnblogs.com/blog/757779/201806/757779-20180606102725279-687158635.png)