二进制安装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 
相关推荐
wdxylb4 分钟前
在远程非桌面版Ubuntu中使用Qt5构建Hello World项目
linux·ubuntu
小羊在奋斗29 分钟前
【Linux】包管理器、vim详解及简单配置
linux·运维·vim
CS_素锦少年37 分钟前
Linux_kernel字符设备驱动12
linux·运维·服务器
NineOne_豆浆狂魔41 分钟前
Linux 缓冲区
linux·服务器·c
陈序缘1 小时前
Go语言实现长连接并发框架 - 消息
linux·服务器·开发语言·后端·golang
mysql学习中1 小时前
Linux的环境变量
linux·运维·服务器·tcp/ip·centos
it00zyq2 小时前
Linux网络编程
linux·网络
诡异森林。2 小时前
Linux--IO模型与高级IO重要概念
linux·运维·php
7yewh2 小时前
C语言刷题 LeetCode 30天挑战 (八)快慢指针法
linux·c语言·开发语言·数据结构·算法·leetcode·链表
长天一色2 小时前
【Docker从入门到进阶】06.常见问题与解决方案 & 07.总结与资源
运维·docker·容器