ubuntu16.04安装docker11.09

1.    安装Docker

操作系统 ubuntu16.04

1.1.   配置源文件

$sudo apt-get update

#允许 apt 命令 HTTPS 访问 Docker 源

$sudo apt-get install  apt-transport-https  ca-certificates     curl software-properties-common  -y

#添加 Docker 官方的 GPG

$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

#将 Docker 的源添加到 /etc/apt/sources.list

$sudo add-apt-repository    "deb [arch=amd64] https://download.docker.com/linux/ubuntu    $(lsb_release -cs)    stable"

1.2.   安装docker-ce

$ sudo apt-get update

$ sudo apt-get install docker-ce -y

1.3.   配置加速器

$curl -sSL https://get.daocloud.io/daotools/set_mirror.sh | sh -s http://afa21fb2.m.daocloud.io

$ systemctl restart docker.service

1.4.   运行hello-world容器

$ sudo docker run hello-world

posted @ 2017-12-05 17:48  苏方木  阅读(230)  评论(0编辑  收藏  举报