docker离线安装部署_docker官方中文文档

docker离线安装部署_docker官方中文文档离线安装docker

大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。

Jetbrains全系列IDE稳定放心使用

docker 离线安装部署

下载地址
docker下载地址
我使用的是docker-20.10.8.tgz

解压
chmod 777 docker-20.10.8.tgz
tar -zxvf docker-20.10.9-ce.tgz

解压之后的文件复制到 /usr/bin/ 目录下
cp docker/* /usr/bin/

新增docker.service文件
在/etc/systemd/system/目录下新增docker.service文件

通过 vi 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 --selinux-enabled=false
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

启动docker
#给docker.service文件添加执行权限
chmod +x /etc/systemd/system/docker.service
#重新加载配置文件(每次有修改docker.service文件时都要重新加载下)
systemctl daemon-reload
#启动docker
systemctl start docker
设置开机启动
#systemctl enable docker.service
#查看docker服务状态
systemctl status docker
在这里插入图片描述

docker-compose 离线安装

首先下载离线文件

下载地址

上传至服务器
/usr/local/bin/

添加权限

chmod +x /usr/local/bin/docker-compose

检查状态

docker-compose -v
在这里插入图片描述

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/189324.html原文链接:https://javaforall.net

(0)
上一篇 2026年4月13日 下午11:43
下一篇 2026年4月13日 下午11:49


相关推荐

  • 使用docker、Jenkins、gitlee、springboot、搭建个人博客网站 并实现CI/CD 外加机器人提醒

    使用docker、Jenkins、gitlee、springboot、搭建个人博客网站 并实现CI/CD 外加机器人提醒前言 服务器用的是云服务器买的阿里的 linux jdk1 8 docker 服务端使用的为阿里的 docker 镜像仓库 mysql 使用 5 7 版本的 redis 使用最新版即可 文件服务使用的阿里的 oss

    2026年3月19日
    1
  • Pycharm代码docker容器运行调试 | 机器学习系列

    Pycharm代码docker容器运行调试 | 机器学习系列介绍常规的本地化运行机器学习代码,安装Anaconda+cuda显卡驱动支持,许多文章都有介绍,不在此多做赘述了。本文主要是为了解决在工作环境中,本机电脑没有显卡,需要将程序运行在带显卡的远程服务器上。本文会介绍如何部署使用显卡的docker容器、如何使用pycharm连接docker容器运行机器学习代码。版本Pycharm:2020.1.3docker:19.03.12python:3.6.13demo算法:BackgroundMattingV2部署下面我会按照.

    2022年8月28日
    7
  • docker部署web项目_docker web管理工具

    docker部署web项目_docker web管理工具前言前面我们运行的容器并没有一些什么特别的用处。接下来让我们尝试使用docker构建一个web应用程序。我们将在docker容器中运行一个PythonFlask应用来运行一个web

    2022年7月29日
    9
  • 〖Docker指南②〗Docker常用命令汇总

    〖Docker指南②〗Docker常用命令汇总Docker常用命令汇总最新版|帮助命令|镜像命令|容器命令

    2026年1月19日
    7
  • 卸载Docker CE

    卸载Docker CEnbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp nbsp 卸载 DockerCE 前言针对上一篇博客中的 DockerCE 的安装 有可能在实际的生产环境中使用 Docker 不是最新的 Latest 而需要特定 TAG 这儿就需要以前的 DockerCE 所有的安装包卸载干净 才能再次进行安装 nbsp 卸载 Do

    2026年3月26日
    2
  • Docker 开启API:2375[通俗易懂]

    Docker 开启API:2375[通俗易懂]Docker开启APIDocker默认文件位置:/usr/lib/systemd/system/docker.servicecd/usr/lib/systemd/system/vimdocker.service修改[Service]区ExecStart行为下面的内容[Service]Type=notify#thedefaultisnottousesy…

    2022年6月10日
    44

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号