redhat安装docker 24.0.7

1、下载docker镜像包

wget https://download.docker.com/linux/static/stable/x86_64/docker-24.0.7.tgz

2、解压

tar -xvf docker-24.0.7.tgz

3、解压的docker文件夹全部移动至/usr/bin目录

cd docker

cp -p docker/* /usr/bin

4、注册服务

vi /usr/lib/systemd/system/docker.service

添加 下面内容

Unit

Description=Docker Application Container Engine

Documentation=http://docs.docker.com

After=network.target docker.socket

Service

Type=notify

EnvironmentFile=-/run/flannel/docker

WorkingDirectory=/usr/local/bin

ExecStart=/usr/bin/dockerd \

-H tcp://0.0.0.0:4243 \

-H unix:///var/run/docker.sock \

--selinux-enabled=false \

--log-opt max-size=1g

ExecReload=/bin/kill -s HUP $MAINPID

Having non-zero Limit*s causes performance problems due to accounting overhead

in the kernel. We recommend using cgroups to do container-local accounting.

LimitNOFILE=infinity

LimitNPROC=infinity

LimitCORE=infinity

Uncomment TasksMax if your systemd version supports it.

Only systemd 226 and above support this version.

#TasksMax=infinity

TimeoutStartSec=0

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

Restart=on-failure

Install

WantedBy=multi-user.target

5、重启守护进程

systemctl daemon-reload

systemctl start docker

systemctl enable docker

6、检查docker服务是否正常

systemctl status docker

相关推荐
zly350011 分钟前
VMware Converter Standalone 物理机转化为虚拟机后源1硬盘变成了2个硬盘(2个硬盘文件)虚拟机无法启动。
linux·运维·服务器
智能运维指南25 分钟前
2026 企业智能运维平台选型:私有化、信创、全链路打通该怎么权衡?
运维·嘉为蓝鲸·aiops平台·一体化运维平台
春天花会开1311 小时前
Supabase 自部署 Edge Functions 超时从 60s 延长到 360s 完整复盘
运维·云原生
当下新鲜事1 小时前
脱硫脱硝塔动力系统科普:四方DL500变频器工作原理解析
大数据·运维·物联网·业界资讯
Lsetea2 小时前
Nginx报No required SSL certificate was sent:mTLS客户端证书排查
运维·nginx·https·ssl·openssl
山岚的运维笔记3 小时前
mysql 专业笔记 -- 第 36 章:MySQL 管理
运维·数据库·笔记·后端·mysql·oracle·dba
DFT计算杂谈3 小时前
TRIQS 4.0.2 完整安装与使用指南
运维
程序猿小郑3 小时前
Docker Compose 构建完整服务实战指南:从入门到最佳实践
docker·容器
蓝速科技4 小时前
商用复杂环境翻译机耐用性选型指南丨蓝速科技
大数据·运维·数据库·人工智能·科技
yt004yt4 小时前
工业园区绿岛 VOCs 废气治理管网设计与能碳节能设计经验分享
大数据·运维