ubuntu安装docker

1-更新 apt 包索引

sudo apt update

2-安装依赖包

sudo apt install apt-transport-https ca-certificates curl gnupg2 software-properties-common

3-添加阿里云的Docker CE仓库的GPG密钥

curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -

 

4-添加阿里云的仓库

sudo add-apt-repository "deb [arch=amd64] https://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"

5-更新APT包索引

sudo apt-get update

6-安装Docker CE

sudo apt-get install docker-ce docker-ce-cli containerd.io

 参考:Ubuntu 20.04 安装docker(傻瓜试一键教程)

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

补充说明:

按照参考链接的安装方式:添加 Docker 的官方 GPG 密钥和官方安装会报错

Hit:1 http://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic InRelease
Hit:2 http://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-updates InRelease      
Hit:3 http://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-backports InRelease    
Ign:4 https://download.docker.com/linux/ubuntu bionic InRelease                
Hit:5 http://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-security InRelease     
Err:6 https://download.docker.com/linux/ubuntu bionic Release                  
  Could not handshake: Error in the pull function. [IP: 2600:9000:234b:c600:3:db06:4200:93a1 443]
Ign:7 http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu bionic InRelease          
Hit:8 http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu bionic Release            
Hit:10 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu bionic InRelease   
Hit:11 http://ppa.launchpad.net/ubuntu-desktop/ubuntu-make/ubuntu bionic InRelease
Reading package lists... Done
E: The repository 'https://download.docker.com/linux/ubuntu bionic Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值