docker源

安装部署

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#删除清理

sudo yum remove docker \
docker-client \
docker-client-latest \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-engine



#安装依赖工具
sudo yum install -y yum-utils

添加阿里云官方仓库
sudo yum-config-manager \
--add-repo \
https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

yum install -y docker-ce docker-ce-cli containerd.io

systemctl start docker
systemctl enable docker

vim /etc/docker/daemon.json
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
{
   "registry-mirrors": [
       "https://docker.m.daocloud.io",
       "https://dockerproxy.com",
       "https://docker.mirrors.ustc.edu.cn",
       "https://docker.nju.edu.cn",
       "https://iju9kaj2.mirror.maliyuncs.com",
       "http://hub-mirror.c.163.com",
       "https://cr.console.aliyun.com",
       "https://hub.docker.com",
       "http://mirrors.ustc.edu.cn"
   ]
}
1
2
systemctl daemon-reload
systemctl restart docker

或者

1
2
3
4
5
6
7
8
更新Linux系统软件源
bash <(curl -sSL https://linuxmirrors.cn/main.sh)

docker安装与换源
bash <(curl -sSL https://linuxmirrors.cn/docker.sh)

docker更换镜像加速器
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) --only-registry
本文采用 CC BY-NC-SA 4.0 许可协议
使用 Hugo 构建
主题 StackJimmy 设计