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

相关推荐
qq_3494479525 分钟前
K8S Helm安装
云原生·容器·kubernetes
百年੭ ᐕ)੭*⁾⁾27 分钟前
Redash部署指南(Windows docker部署)
大数据·windows·docker·数据可视化·redash
yyuuuzz35 分钟前
企业出海云服务器部署踩坑记录:从频繁超时到稳定运行的复盘
运维·服务器·网络·人工智能·aws
科技研学社43 分钟前
服装后道自动化选型|五大品牌全自动激光开袋机深度对比分析报告
运维·自动化
中电金信1 小时前
源启DevOps平台落地实践:从40分钟到3分钟,构建部署提效13倍
运维·devops
2401_834636991 小时前
Docker 容器化技术全解:从镜像构建到容器编排的完整教案2
运维·docker·容器
qq_25294131681 小时前
窗户清洁检测数据集 | 窗户清洁检测 建筑运维 二分类任务 YOLO格式 深度学习数据集9019期
运维·人工智能·深度学习·yolo·目标检测·分类·窗户清晰度
星辰徐哥1 小时前
打破社媒营销信息差:具身交互智能打造全自动化KOL情报体系
运维·python·自动化·交互·react·数字人
醉颜凉1 小时前
Jenkins与Git集成完全指南:从基础配置到自动触发构建
运维·git·jenkins
JuiceFS2 小时前
如何通过 S3 和 WebDAV 协议访问 JuiceFS?
运维·人工智能·后端