欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

ubuntu使用国内源安装docker

程序员文章站 2022-07-15 17:12:25
...
  1. 安装软件包
sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common

2.添加软件源的GPG**(我用的中科大)
中科大

curl -fsSL https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu/gpg | sudo apt-key add -

阿里源

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

3.向 source.list 中添加Docker软件源
中科大

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

阿里源

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

4.更新& 安装

sudo apt-get update
sudo apt-get install docker-ce
也可以指定版本安装
sudo apt-get install docker-ce=<VERSION>
相关标签: 其他