当前位置: 首页 > news >正文

内网下,Ubuntu (24.10) 离线安装docker最新版教程

一般在数据比较敏感的情况下,是无法使用网络的,而对于Ubuntu系统来说,怎么离线安装docker呢?

下面我给大家来讲一下:

采用二进制安装:

1.下载docker离线包

官网下载:

Index of linux/static/stable/x86_64/https://download.docker.com/linux/static/stable/x86_64/

2.解压离线包
tar -xvf docker-27.5.1.tgz
3.将解压的docker拷贝或移动到/usr/bin/目录下
sudo cp docker/* /usr/bin/
4.编写docker.service 文件加入Linux服务当中并开启守护进程
sudo 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 -H unix:///var/run/docker.sock --selinux-enabled=false --default-ulimit nofile=65536:65536
ExecReload=/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.添加文件可执行权限
sudo chmod +x /etc/systemd/system/docker.service
6.配置成功后,重新加载 daemon 服务 , 并启动docker
sudo systemctl daemon-reload
sudo systemctl start docker

http://www.dtcms.com/a/23449.html

相关文章:

  • 【踩坑实录】-Boundary Amount must be a positive integer, provided amount is: 0
  • 第四届网络安全、人工智能与数字经济国际学术会议(CSAIDE 2025)
  • Python----数据结构(单链表:节点,是否为空,长度,遍历,添加,删除,查找)
  • VINS-mono代码笔记
  • Java 运行时常量池笔记(详细版
  • 第150场双周赛:好数字之和、分割正方形 Ⅰ、分割正方形 Ⅱ、最短匹配字符串
  • 第1章大型互联网公司的基础架构——1.2 客户端连接机房的技术1:DNS
  • Java基于 SpringBoot+Vue的微信小程序跑腿平台V2.0(附源码,文档)
  • css里flex+margin布局
  • iOS 中使用 FFmpeg 进行音视频处理
  • 机器学习数学基础:27.数字特征
  • 深入解析 iOS 视频录制(一):录制管理核心MWRecordingController 类的设计与实现
  • 网络安全不分家 网络安全不涉及什么
  • el-input无法输入0.0001的小数,自动转换为0在vue3中的bug
  • 【SpringBoot注解失效】@注解为什么不生效?
  • home assistant ddns动态域名解析插件
  • AWS上Amazon Redshift用Zoominfo API验证公司基本信息数据正确性检查设计方案
  • Vue 前端开发中的路由知识:从入门到精通
  • STM32外设SPI FLASH应用实例
  • 2.16日学习总结
  • Flutter 记一次疑难杂症
  • 【HUSTOJ 判题机源码解读系列04】判题机常见技术选择方案
  • 响应式布局学习笔记
  • BT401双模音频蓝牙模块如何开启ble的透传,有什么注意事项
  • 从零到一:Spring Boot 与 RocketMQ 的完美集成指南
  • GPT-4o悄然升级:能力与个性双突破,AI竞技场再掀波澜
  • Go 模块管理工具 `go mod tidy` 和 `go.sum` 文件详解
  • 在 Android 上自定义编译 FFmpeg
  • 嵌入式Linux系统SPI驱动移植专题详解(3000+字图文实战指南)
  • 康耐视CAM-CIC-10MR-10-GC工业相机