抱歉,您的浏览器无法访问本站
本页面需要浏览器支持(启用)JavaScript
了解详情 >

下载包

以下为CentOS8的安装包,其他系统可到https://download.docker.com/linux/找对应包

1
2
3
yum -y install http://docker-release-yellow-prod.s3-website-us-east-1.amazonaws.com/linux/centos/8/aarch64/stable/Packages/containerd.io-1.4.6-3.1.el8.aarch64.rpm
yum -y install http://docker-release-yellow-prod.s3-website-us-east-1.amazonaws.com/linux/centos/8/aarch64/stable/Packages/docker-ce-cli-20.10.7-3.el8.aarch64.rpm
yum -y install http://docker-release-yellow-prod.s3-website-us-east-1.amazonaws.com/linux/centos/8/aarch64/stable/Packages/docker-ce-20.10.7-3.el8.aarch64.rpm

启动和开机自启

1
2
systemctl start docker
systemctl enable docker

配置国内源

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
vi /etc/docker/daemon.json
## 填入以下内容
{
"log-driver":"json-file",
"log-opts":{
"max-size":"500m",
"max-file":"3",
"labels":"production_status,geo",
"env":"os,customer"
},
"registry-mirrors":[
"https://registry.docker-cn.com",
"http://hub-mirror.c.163.com"
],
"dns":[
"8.8.8.8",
"8.8.4.4",
"114.114.114.114"
]
}

安装ptr管理面板

可略,因一般通过portainer来管理docker swarm,因此顺便贴上脚本

1
docker run -d --name ptr --restart=always -p 9000:9000 --mount  type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock --mount type=volume,src=portainer_data,dst=/data portainer/portainer -H unix:///var/run/docker.sock

评论