linux离线安装docker

安装连接参考

docker离线安装部署详细步骤-CSDN博客

(1)安装包下载

根据机器架构选择x86_64或 aarch64 版本的docker安装包

Index of linux/static/stable/

(2)安装包解压

(3)复制文件

将docker中的全部文件,使用以下命令,复制到/usr/bin

cp ./docker/* /usr/bin

(4)创建docker.service文件

vim /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

the default is not to use systemd for cgroups because the delegate issues still

exists and systemd currently does not support the cgroup feature set required

for containers run by docker

ExecStart=/usr/bin/dockerd

ExecReload=/usr/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 the docker process if it exits prematurely

Restart=on-failure

StartLimitBurst=3

StartLimitInterval=60s

Install

WantedBy=multi-user.target

(5) 添加执行权限

chmod +x docker.service

(6)执行docker检查

加载docker.service

systemctl daemon-reload

启动docker

systemctl start docker

查看docker

systemctl status docker

(7)开机自启动

systemctl enable docker.service

相关推荐
Zhu7587 小时前
【问题处理】minIO(AIStor)在k8s部署后,API访问失败的问题,TLS
云原生·容器·kubernetes
IT大白鼠7 小时前
Linux进程与计划任务管理:技术详解与实战指南
linux·运维·服务器
临街的小孩7 小时前
Docker 容器内运行 ROS Noetic 图形界面(rqt_image_view)极简教程总结
运维·docker·容器
hweiyu008 小时前
Linux命令:arptables
linux·运维
看到代码头都是大的9 小时前
Windows环境下绿色版nginx 1.30使用
运维·nginx
IT研究所9 小时前
AI 时代下的知识管理:从 Claude 的“复盘”能力看生成式 AI价值
大数据·运维·数据库·人工智能·科技·低代码·自然语言处理
仙柒4159 小时前
管理网络安全
linux·运维·服务器
云边云科技_云网融合10 小时前
企业出海的 “数字丝绸之路“:SD-WAN 如何重构全球网络竞争力
大数据·运维·网络·人工智能
JZC_xiaozhong10 小时前
2026年深圳企业如何统一管理ERP、MES、OA权限?身份识别与访问管理高效方案
大数据·运维·自动化·企业数据安全·数据集成与应用集成·权限治理·多系统权限管理
福尔摩斯·柯南10 小时前
Ubuntu 14.04/16.04/18.04/20.04/22.04/24.04/26.04全系列LTS长期支持版镜像IOS分享
linux·运维·ubuntu