乐趣区

关于openeuler:openEuler离线安装docker

docker 下载地址:
https://download.docker.com/linux/static/stable/

所有版本都有,依据你的需要去抉择。我这里下载的 docker 版本号是 20.10.23

# wget  https://download.docker.com/linux/static/stable/x86_64/docker-20.10.23.tgz
# tar zxvf docker-20.10.23.tgz 
# cp docker/* /usr/bin/
# vim /etc/systemd/system/docker.service  (创立配置文件)

配置内容如下:

[Unit] 
Description=Docker Application Container Engine 
Documentation=https://docs.docker.com 
After=network-online.target firewalld.service 
Wants=network-online.target 
[Service] 
Type=notify 
ExecStart=/usr/bin/dockerd --selinux-enabled=false --insecure-registry=127.0.0.1 
ExecReload=/bin/kill -s HUP $MAINPID 
LimitNOFILE=infinity 
LimitNPROC=infinity 
LimitCORE=infinity 
TimeoutStartSec=0 
Delegate=yes 
KillMode=process 
Restart=on-failure 
StartLimitBurst=3 
StartLimitInterval=60s 
[Install] 
WantedBy=multi-user.target 

执行如下命令:

# chmod +x /etc/systemd/system/docker.service
# systemctl daemon-reload
# systemctl start docker
# systemctl enable docker
# docker --version
Docker version 20.10.23, build 7155243

配置加速器减速下载 docker 镜像

vim /etc/docker/daemon.json
{"registry-mirrors": ["https://gg3gwnry.mirror.aliyuncs.com"]
}

重启服务:

systemctl daemon-reload
systemctl restart docker

转载 https://zhuanlan.zhihu.com/p/605722454

退出移动版