1.下载安装
- [root@openEuler-node1 ~]# wget -c https://download.docker.com/linux/static/stable/x86_64/docker-25.0.3.tgz
- [root@openEuler-node1 ~]# wget -c https://download.docker.com/linux/static/stable/x86_64/docker-rootless-extras-25.0.3.tgz
-
2.解压到指定目录
[root@openEuler-node1 ~]# tar xf docker-25.0.3.tgz -C /usr/local/
3.写配置文件
- [root@openEuler-node1 docker]# vi /usr/lib/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
- EnvironmentFile=-/etc/sysconfig/docker
- EnvironmentFile=-/etc/sysconfig/docker-storage
- EnvironmentFile=-/etc/sysconfig/docker-network
- Environment=GOTRACEBACK=crash
-
- ExecStart=/usr/bin/dockerd $OPTIONS \
- $DOCKER_STORAGE_OPTIONS \
- $DOCKER_NETWORK_OPTIONS \
- $INSECURE_REGISTRY
- ExecReload=/bin/kill -s HUP $MAINPID
- LimitNOFILE=1048576
- LimitNPROC=1048576
- LimitCORE=infinity
- # set delegate yes so that systemd does not reset the cgroups of docker containers
- Delegate=yes
- # kill only the docker process, not all processes in the cgroup
- KillMode=process
-
- [Install]
- WantedBy=multi-user.target
4.启动
- [root@openEuler-node1 docker]# cp /usr/local/docker/* /usr/bin/
- [root@openEuler-node1 docker]# systemctl daemon-reload
- [root@openEuler-node1 docker]# systemctl start docker.service