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

相关推荐
木卫二号Coding6 分钟前
jupyterlab-安装与启动
linux·运维·服务器
fengyehongWorld29 分钟前
Linux logger命令
linux·运维·服务器
一只鹿鹿鹿37 分钟前
网络信息与数据安全建设方案
大数据·运维·开发语言·网络·mysql
好好学习啊天天向上44 分钟前
最新:ubuntu上源码安装llvm,还没有成功
linux·运维·ubuntu
小宇的天下1 小时前
Calibre nmDRC 运行机制与规则文件(13-2)
运维·开发语言
Guistar~~1 小时前
【Linux驱动开发IMX6ULL】使用NXP MfgTool 烧写系统到eMMC
linux·运维·驱动开发
合利士智能装备1 小时前
电机自动化生产线如何破解扁线电机定子滴漆低效与不一致?
运维·自动化·汽车·视觉检测·能源·制造
航Hang*2 小时前
第五章:网络系统建设与运维(中级)——生成树协议
运维·服务器·网络·笔记·华为·ensp
catoop2 小时前
生产环境 nginx 推荐配置
运维·nginx
啵啵啵啵哲2 小时前
【输入法】Ubuntu 22.04 终极输入法方案:Fcitx5 + 雾凇拼音 (Flatpak版)
linux·运维·ubuntu