二进制安装docker

1.下载安装

bash 复制代码
[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.解压到指定目录

bash 复制代码
[root@openEuler-node1 ~]# tar xf docker-25.0.3.tgz -C /usr/local/

3.写配置文件

bash 复制代码
[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.启动

bash 复制代码
[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 
相关推荐
轻松Ai享生活6 小时前
5 节课深入学习Linux Cgroups
linux
christine-rr7 小时前
linux常用命令(4)——压缩命令
linux·服务器·redis
muyun28007 小时前
Docker 下部署 Elasticsearch 8 并集成 Kibana 和 IK 分词器
elasticsearch·docker·容器
三坛海会大神5557 小时前
LVS与Keepalived详解(二)LVS负载均衡实现实操
linux·负载均衡·lvs
東雪蓮☆7 小时前
深入理解 LVS-DR 模式与 Keepalived 高可用集群
linux·运维·服务器·lvs
乌萨奇也要立志学C++7 小时前
【Linux】进程概念(二):进程查看与 fork 初探
linux·运维·服务器
獭.獭.9 小时前
Linux -- 信号【上】
linux·运维·服务器
hashiqimiya9 小时前
centos配置环境变量jdk
linux·运维·centos
hashiqimiya9 小时前
权限更改centos中系统文件无法创建文件夹,使用命令让普通用户具备操作文件夹
linux
傻傻虎虎12 小时前
【Docker】常用帮忙、镜像、容器、其他命令合集(2)
运维·docker·容器