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

你可能感兴趣的:(openeulerdocker)