- 安装Docker-CE
备注:Docker 安装,请参考 Docker 官⽅⽂档:
Install Docker Engine on Ubuntu | Docker Documentation
也可参照如下命令进行快速安装。
- Ubuntu
卸载旧版本(视需要)
$ sudo apt-get remove docker docker-engine docker.io containerd runc
$ sudo apt-get update
$ sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg \
lsb-release
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
$ echo \
"deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
$ sudo apt-get update
$ sudo apt-get install docker-ce docker-ce-cli containerd.i
2.测试测试docker安装是否成功:
docker pull hello-world
docker run hello-world
3.安装过程中遇到的问题
问题1:麒麟系统问题及解决方法
问题2:
解决方法:
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["https://yxzrazem.mirror.aliyuncs.com"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker
解决结果: