【Docker】离线一键式安装docker、docker-compose

1.创建根目录(可随意)

mkdir -p /docker

2.上传文件

资源地址


[root@localhost docker]# tree /docker/
/docker/
├── docker
│   ├── docker-18.03.1-ce.tgz
│   └── docker-compose-Linux-x86_64
├── install-docker-compose.sh
└── install-docker.sh

3.安装

# 脚本赋执行权限
chmod +x *.sh
# 安装docker
./install-docker.sh
# 安装docker-compose
./install-docker-compose.sh

操作日志:

[root@localhost docker]# chmod +x *.sh
[root@localhost docker]# ls
docker  install-docker-compose.sh  install-docker.sh
[root@localhost docker]#
[root@localhost docker]#
[root@localhost docker]# ./install-docker.sh
 ++++++++   current docker version 3.10   ++++++++
 ++++++++   Can be installed docker   ++++++++
 ++++++++   Start installing Docker   ++++++++
已加载插件:fastestmirror
参数 docker 没有匹配
参数 docker-client 没有匹配
参数 docker-client-latest 没有匹配
参数 docker-common 没有匹配
参数 docker-latest 没有匹配
参数 docker-latest-logrotate 没有匹配
参数 docker-logrotate 没有匹配
参数 docker-engine 没有匹配
不删除任何软件包
 ++++++++   Start install -docker-18.03.1-ce.tgz ,please waiting...   ++++++++
docker/
docker/dockerd
docker/docker-proxy
docker/docker-containerd
docker/docker-runc
docker/docker-init
docker/docker-containerd-shim
docker/docker
docker/docker-containerd-ctr
[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
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

 ++++++++   Install success   ++++++++
Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /etc/systemd/system/docker.service.
Docker version 18.03.1-ce, build 9ee9f40
 ++++++++   docker restart and join the boot   ++++++++
[root@localhost docker]#
[root@localhost docker]#
[root@localhost docker]# ./install-docker-compose.sh
Start install docker-compose ...
Install docker-compose suceess
docker-compose version 1.24.1, build 4667896b
[root@localhost docker]#

相关推荐

  1. Docker线安装dockerdocker-compose

    2023-12-18 06:14:06       50 阅读
  2. docker-compose线安装

    2023-12-18 06:14:06       33 阅读
  3. 线安装dockerdocker-compose

    2023-12-18 06:14:06       40 阅读
  4. 保姆级线环境安装dockerdocker-compose

    2023-12-18 06:14:06       18 阅读
  5. Dockerdockerdocker-compose安装脚本(linux)

    2023-12-18 06:14:06       17 阅读

最近更新

  1. TCP协议是安全的吗?

    2023-12-18 06:14:06       16 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2023-12-18 06:14:06       16 阅读
  3. 【Python教程】压缩PDF文件大小

    2023-12-18 06:14:06       15 阅读
  4. 通过文章id递归查询所有评论(xml)

    2023-12-18 06:14:06       18 阅读

热门阅读

  1. matlab实现单精度、16进制之间的转换函数

    2023-12-18 06:14:06       36 阅读
  2. 前端已死?尊嘟假嘟?

    2023-12-18 06:14:06       33 阅读
  3. React基础知识点与实践

    2023-12-18 06:14:06       30 阅读
  4. 学习C语言——体会计算机中的0和1

    2023-12-18 06:14:06       34 阅读
  5. HTML5面试题

    2023-12-18 06:14:06       33 阅读
  6. mysql 的charset是什么 有哪些?

    2023-12-18 06:14:06       36 阅读
  7. 【golang】go执行shell命令行的方法( exec.Command )

    2023-12-18 06:14:06       45 阅读
  8. DOS及DDOS的原理及防御方式

    2023-12-18 06:14:06       34 阅读