PassJava (佳必过) 项目全套学习教程连载中,关注公众号第一时间获取。
安装docker
https://docs.docker.com/engine/install/ubuntu/
1.卸载老版本docker
sudo apt-get remove docker docker-engine docker.io containerd runc
2. 设置仓库
$ sudo apt-get update
$ sudo apt-get install
apt-transport-https
ca-certificates
curl
gnupg-agent
software-properties-common
sudo add-apt-repository
"deb [arch=amd64] https://download.docker.com/linux/ubuntu
$(lsb_release -cs)
stable"
3.安装docker
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
4. 测试安装成功
sudo docker run hello-world
5.设置开机自启动
sudo systemctl enable
6.配置镜像加速
https://cr.console.aliyun.com/cn-hangzhou/instances/mirrors