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

相关推荐
探索云原生1 小时前
终于搞懂 Kueue:5 个核心对象一次讲透
linux·docker·ai·云原生·kubernetes
huainingning2 小时前
交换机通过ftp下载文件或者传输文件到ftp服务器
运维·服务器·网络
edwarddamon2 小时前
CentOS 7 国内安装 Docker CE(阿里云源)
运维
AI服务老曹2 小时前
Docker部署AI视频分析平台参数配置说明与调优指南
人工智能·docker·音视频
Championship.23.242 小时前
Linux 3.0 LVDS驱动开发详解
linux·运维·驱动开发·lvds
eggcode3 小时前
docker拉取、重命名、导出导入、删除镜像的示例
docker
小池先生3 小时前
Windows服务器如何备份
运维·服务器
风向决定发型丶3 小时前
Shell中的特殊变量
linux·运维·bash
FII工业富联科技服务4 小时前
灯塔工厂用例详解:AR 远程巡检与智能运维闭环落地实践
运维·ar
蜀道山老天师4 小时前
从零读懂 K8s:核心概念、集群架构与工作原理
容器·架构·kubernetes