下载Docker离线安装包
下载地址:https://download.docker.com/linux/static/stable/
下面以安装docker-23.0.5.tgz为例。
安装Docker
解压docker-23.0.5.tgz
[root@mccp ~]# tar -zxvf docker-23.0.5.tgz
docker/
docker/docker-proxy
docker/containerd-shim-runc-v2
docker/ctr
docker/docker
docker/docker-init
docker/runc
docker/dockerd
docker/containerd
将docker目录下文件拷贝到/usr/bin
cp -r docker/* /usr/bin/
创建配置文件docker.service
[root@mccp ~]# cat /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
docker.service配置文件添加可执行权限
chmod +x /etc/systemd/system/docker.service
重启docker配置文件
systemctl daemon-reload
systemctl start docker
systemctl enable docker
docker --version
标签:bin,OpenEuler22.03,配置文件,service,SP3,离线,Docker,docker From: https://www.cnblogs.com/hsh96/p/18150538