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

docker离线安装并修改存储目录

docker下载

根据cpu选择不同版本,正常x86就选x86_64
下载地址:https://download.docker.com/linux/static/stable/

docker安装

tar -zxvf arm-docker-25.0.4.tgz
sudo cp docker/* /usr/bin/
rm -rf docker/*
mkdir /etc/docker
vi /etc/docker/daemon.json

填入内容

{"data-root": "/data/docker"
}

设置启动项

vi /usr/lib/systemd/system/docker.service

填入内容

[Unit]
Description=Docker Application Container Engine
Documentation=http://docs.docker.com
After=network.target docker.socket
[Service]
Type=notify
EnvironmentFile=-/run/flannel/docker
WorkingDirectory=/usr/local/bin
ExecStart=/usr/bin/dockerd \-H tcp://0.0.0.0:4243 \-H unix:///var/run/docker.sock \--selinux-enabled=false \--log-opt max-size=1g
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=on-failure
[Install]
WantedBy=multi-user.target

docker启动

systemctl daemon-reload
systemctl start docker
http://www.lryc.cn/news/322100.html

相关文章:

  • 【云原生 • Kubernetes】认识 k8s、k8s 架构、核心实战
  • 墨菲安全在软件供应链安全领域阶段性总结及思考
  • 智慧公厕:卫生、便捷、安全的新时代厕所变革
  • Idea 不能创建JDK1.8的spring boot项目
  • 【docker】Docker学习收集
  • LoRa模块在野外科研与环境保护中的角色:科技守护自然之宝
  • 全国媒体公关服务资源分析,媒体邀约资源包括哪些?-51媒体网
  • 【Springboot3+Mybatis】文件上传阿里云OSS 基础管理系统CRUD
  • 音频和视频标签
  • 计算机组成原理 运算器的组成实验
  • SpringBoot 启用 Https,生成 jks 自签证书
  • 微服务day04(下) -- SpringAMQP
  • RK3568平台开发系列讲解(pinctrl篇)pinctrl 子系统函数操作集
  • 音频转换器哪个好?5个角度详细测评~
  • 功率电感的工艺结构原理及选型参数总结
  • 大数据扩展
  • 关于数组初始化问题
  • webRtc麦克风摄像头检测
  • 3703. 括号的匹配 北京师范大学考研上机真题 栈的思想
  • SpringCloud中的@EnableDiscoceryClient和@EnableFeignClients注解的作用解析、RPC远程过程调用
  • 关于安卓文件复制的杂谈(一)文件复制,文件夹复制
  • Lucene查询语法,适用于 ELk Kibana 查询
  • 蓝桥杯2023年第十四届省赛真题-阶乘求和
  • 多租户平台前端存储结构的选择
  • C++11 新特性:常量表达式 constexpr(下)
  • 大数据开发--02.环境准备
  • 选择word中的表格VBA
  • 开放签开源电子签章白皮书-简版
  • uniapp、vue2.6、H5,利用腾讯TRTC,快速跑通1v1视频功能
  • Spring Data访问Elasticsearch----查询方法