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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
CentOs设置国内源
1、切用户、切到原文件件
su root

cd /etc/yum.repos.d/

2、下载源文件
wget http://mirrors.aliyun.com/repo/Centos-7.repo

3、重命名
mv CentOS-Base.repo CentOS-Base.repo.bak

mv Centos-7.repo CentOS-Base.repo

4、更新缓存
yum clean all

yum makecache

yum update

yum install net-tools

yum install -y yum-utils

yum provides '*/applydeltarpm'
yum install deltarpm -y

$ sudo yum-config-manager \\
--add-repo \\
https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

yum-config-manager \\
--add-repo \\
https://download.docker.com/linux/centos/docker-ce.repo

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

systemctl start docker

mkdir -p /etc/docker

tee /etc/docker/daemon.json <<-'EOF'
{
\"registry-mirrors\": [
\"https://m.daocloud.io/docker.io/library/python:3.10.14-bookworm\",
\"https://78mwycsx.mirror.aliyuncs.com\",
\"https://docker.mirrors.ustc.edu.cn\",
\"http://mirrors.ustc.edu.cn/\"
]
}
EOF

systemctl restart docker