ubuntu安装docker方法:
1.如果过去安装过docker,先删掉
sudo apt-get remove docker docker-engine docker.io
2.安装依赖
sudo apt-get install apt-transport-https ca-certificates curl gnupg2 software-properties-common
3.信任 Docker 的 GPG 公钥:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
4.添加软件仓库
sudo add-apt-repository \
"deb [arch=amd64] https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/ubuntu \
$(lsb_release -cs) \
stable"
5.最后
sudo apt-get update
sudo apt-get install docker-ce