Ubuntu安装docker
官方链接:
https://docs.docker.com/install/linux/docker-ce/ubuntu/
1、更新apt
$ sudo apt-get update
2、安装软件包以允许apt通过HTTPS使用存储库
$ sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
3、使用以下命令来设置稳定的存储库
$ sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
4、安装docker-ce
$ sudo apt-get install docker-ce
5、运行hello-world
$ sudo docker run hello-world