ubuntu 16.04 搭建docker
1.为确保运行的不是旧版Docker
sudo apt-get remove docker docker-engine docker.io
2.添加Docker COmmunity Edition 所需的软件依赖和apt仓库,确保包有正确的签名
1 sudo apt-get install apt-transport-https ca-certificates curl software-properties-common 2 curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - 3 sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
3.安装Docker
1 sudo apt-get update 2 sudo apt-get upgrade 3 sudo apt-get install docker-ce
4.设置在每次引导系统时启动Docker服务器
1 sudo systemctl enable docker 2 sudo systemctl start docker