sudo apt-get update
2.使用下列指令通过HTTPS使用存储库(repository)sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common
3. 安装curlsudo apt-get -y install curl
4. 添加Docker官方GPG密钥curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
可能报错:curl: (28) Operation timed out after 300415 milliseconds with 0 out of 0 bytes received
gpg: no valid OpenPGP data found.
curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to download.docker.com:443
解决:apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys D8576A8BA88D21E9
重新添加官方GPG密钥,显示 OK 即为 成功 5. 设置stable存储库sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
6. 再次更新aptsudo apt-get update
7. 安装docker-cesudo apt-get install -y docker-ce
如果报错:E: There were unauthenticated packages and -y was used without –allow-unauthenticated,使用命令:sudo apt-get install docker-ce 8. 列出可用版本:apt-cache madison docker-ce
docker-ce | 5:19.03.12~3-0~ubuntu-focal | https://download.docker.com/linux/ubuntu focal/stable amd64 Packages
docker-ce | 5:19.03.11~3-0~ubuntu-focal | https://download.docker.com/linux/ubuntu focal/stable amd64 Packages
docker-ce | 5:19.03.10~3-0~ubuntu-focal | https://download.docker.com/linux/ubuntu focal/stable amd64 Packages
docker-ce | 5:19.03.9~3-0~ubuntu-focal | https://download.docker.com/linux/ubuntu focal/stable amd64 Packages
9. 选择安装sudo apt-get install docker-ce=5:19.03.12~3-0~ubuntu-focal
10.启动docker sudo systemctl start docker声明:1. 本站所有资源来源于用户上传和网络,因此不包含技术服务请大家谅解!如有侵权请邮件联系客服!
2. 本站不保证所提供下载的资源的准确性、安全性和完整性,资源仅供下载学习之用!如有链接无法下载、失效或广告,请联系客服处理!
3. 您必须在下载后的24个小时之内,从您的电脑中彻底删除上述内容资源!如用于商业或者非法用途,与本站无关,一切后果请用户自负!
2. 本站不保证所提供下载的资源的准确性、安全性和完整性,资源仅供下载学习之用!如有链接无法下载、失效或广告,请联系客服处理!
3. 您必须在下载后的24个小时之内,从您的电脑中彻底删除上述内容资源!如用于商业或者非法用途,与本站无关,一切后果请用户自负!