离线安装docker

离线安装docker

1、docker下载

复制代码
https://download.docker.com/linux/static/stable/

所有版本都有,根据你的需求去选择。我这里下载的docker版本号是20.10.23

复制代码
# wget  https://download.docker.com/linux/static/stable/x86_64/docker-20.10.23.tgz

2、解压

复制代码
# tar zxvf docker-20.10.23.tgz # cp docker/* /usr/bin/

3、创建服务文件

复制代码
# 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 ExecStart=/usr/bin/dockerd --selinux-enabled=false --insecure-registry=127.0.0.1 ExecReload=/bin/kill -s HUP $MAINPID LimitNOFILE=infinity LimitNPROC=infinity LimitCORE=infinity TimeoutStartSec=0 Delegate=yes KillMode=process Restart=on-failure StartLimitBurst=3 StartLimitInterval=60s [Install] WantedBy=multi-user.target

4、启动​​​​​​​

复制代码
chmod +x /etc/systemd/system/docker.servicesystemctl daemon-reloadsystemctl start dockersystemctl enable dockerdocker --version# Docker version 20.10.23, build 7155243

5、配置加速器加速下载docker镜像​​​​​​​

复制代码
vim /etc/docker/daemon.json{"registry-mirrors": ["https://gg3gwnry.mirror.aliyuncs.com"]}重启服务:systemctl daemon-reloadsystemctl restart docker
相关推荐
布鲁飞丝22 分钟前
vivo Pulsar 万亿级消息处理实践()-Ansible运维部署
运维·ansible
XR12345678827 分钟前
企业全光网络架构选型技术白皮书:从物理层到运维层的全链路分析
运维·网络·架构
HiDev_1 小时前
【非标自动化】2、认识元器件(直线模组)
运维·自动化
龙仔7252 小时前
人大金仓 KingbaseES V8 只读账号创建完整运维笔记
运维·笔记·sql·人大金仓
我不管我就要叫小猪2 小时前
嵌入式Linux----网络通信
linux·运维·服务器
江湖有缘2 小时前
Docker实战 :使用Docker部署OneTerm堡垒机
运维·docker·容器
姜太小白3 小时前
【Linux】df -h 卡住问题的通用排查与解决方案总结
linux·运维·php
张忠琳3 小时前
【NPU】Ascend Docker Runtime v26.0.1 之二 runtime/process/process.go — 超深度逐行分析
云原生·容器·架构·kubernetes·npu·docker-runtime
fengyehongWorld3 小时前
Linux 终端快捷键
linux·运维
看昭奚恤哭4 小时前
平滑加权轮询负载均衡的底层逻辑
运维·负载均衡