直接上安装命令(腾讯云源),不需要翻墙:

sudo apt-get update
sudo apt-get install ca-certificates curl
curl -fsSL http://mirrors.tencentyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] http://mirrors.tencentyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"
sudo apt -y install docker-ce docker-ce-cli containerd.io

sudo systemctl daemon-reload
sudo systemctl restart docker

完成,输入sudo docker ps试试!

成功!

--------------

如果你不希望每次执行docker 命令都需要sudo,那么将当前用户加入docker组即可:

sudo usermod -aG docker 当前用户名

然后docker ps试试

-------------

如果你能翻墙,那么这里有一篇 更快的安装教程:ubuntu docker快速安装指南,以及常见安装错误_can't open get.docker.sh-CSDN博客

Logo

有“AI”的1024 = 2048,欢迎大家加入2048 AI社区

更多推荐