Centos7如何离线安装Docker
发表于:2025-12-02 作者:千家信息网编辑
千家信息网最后更新 2025年12月02日,这篇文章将为大家详细讲解有关Centos7如何离线安装Docker,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。下载Docker并安装docker包下载地址#下载d
千家信息网最后更新 2025年12月02日Centos7如何离线安装Docker
这篇文章将为大家详细讲解有关Centos7如何离线安装Docker,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。
下载Docker并安装
docker包下载地址
#下载docker-20.10.0包https://download.docker.com/linux/static/stable/x86_64/docker-20.10.0.tgz#上传到Centos系统/data/目录,如scp docker-20.10.0.tgz root@192.168.0.5:/data/#进入data目录,解压docker包cd /datatar -zxvf docker-20.10.0.tgz#将解压出来的docker文件内容移动到 /usr/bin/ 目录下cp docker/* /usr/bin/#查看docker版本docker version#查看docker信息docker info
配置Docker开机自启动服务
#添加docker.service文件vi /etc/systemd/system/docker.service#按i插入模式,复制如下内容:
[Unit]Description=Docker Application Container EngineDocumentation=https://docs.docker.comAfter=network-online.target firewalld.serviceWants=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 dockerExecStart=/usr/bin/dockerdExecReload=/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=infinityLimitNPROC=infinityLimitCORE=infinity# Uncomment TasksMax if your systemd version supports it.# Only systemd 226 and above support this version.#TasksMax=infinityTimeoutStartSec=0# set delegate yes so that systemd does not reset the cgroups of docker containersDelegate=yes# kill only the docker process, not all processes in the cgroupKillMode=process# restart the docker process if it exits prematurelyRestart=on-failureStartLimitBurst=3StartLimitInterval=60s [Install]WantedBy=multi-user.target
#添加文件可执行权限chmod +x /etc/systemd/system/docker.service#重新加载配置文件systemctl daemon-reload#启动Dockersystemctl start docker#查看docker启动状态systemctl status docker#查看启动容器docker ps#设置开机自启动systemctl enable docker.service#查看docker开机启动状态 enabled:开启, disabled:关闭systemctl is-enabled docker.service
关于"Centos7如何离线安装Docker"这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,使各位可以学到更多知识,如果觉得文章不错,请把它分享出去让更多的人看到。
文件
内容
目录
篇文章
更多
状态
配置
不错
实用
信息
地址
容器
文章
权限
模式
版本
知识
系统
参考
帮助
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
河南暴雨影响网络服务器虚拟主机
微点主动防御软件开发
数据库第二范式如何理解
华为机顶盒芯片招聘软件开发
交友app软件开发教程
软件开发解决方案是什么
加强网络安全的工作内容
网吧系统没有服务器怎么登陆
php数据库怎么下载
网络技术和电商公司
服务器管理口传送文件
温州网络技术管理系统
四川税务app服务器异常
大学生网络安全教育引导
ssr免流服务器干什么用
简易版网络安全教育手抄报
网络安全军事打击
免费云服务器安装windows
五年级网络安全小报电子版的
皮皮书数据库
百度代码软件开发
网络安全一般是指定义
数据库中四列的数据整合到一起
正版windows服务器
大富豪服务器架设
职高计算机软件开发
有哪些无限通讯网络技术
网络安全产品架构设计
数据库还原完全和差异
网络软件开发是什么意思