1、安装必要的系统工具
1 sudo apt-get update
1 sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common
2、安装GPG证书
1 curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
3、写入软件源信息
1 sudo add-apt-repository "deb [arch=amd64] https://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"
4、更新并安装Docker-CE
1 sudo apt-get -y update
1 sudo apt-get -y install docker-ce