一、Docker离线安装
1、安装环境:
- 系? ? ? ? ? ?统:CentOS Linux release 7.6.1810 (Core)
- Docker版本:18.09.8
2、下载离线安装包
docker安装包下载:https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-18.09.8-3.el7.x86_64.rpm
依赖包下载:
containerd.io:https://download.docker.com/linux/centos/7/x86_64/stable/Packages/containerd.io-1.2.2-3.el7.x86_64.rpm
docker-ce-cli:https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-cli-18.09.8-3.el7.x86_64.rpm
container-selinux:https://pkgs.org/download/container-selinux
3、安装
rpm -ivh docker-ce-cli-18.09.8-3.el7.x86_64.rpm
rpm -ivh container-selinux-2.107-3.el7.noarch.rpm
rpm -ivh containerd.io-1.2.2-3.el7.x86_64.rpm
rpm -ivh docker-ce-18.09.8-3.el7.x86_64.rpm
?4、启动
# 启动
systemctl start docker
# 查看状态
systemctl status docker
Docker-compose安装
下载:
https://github.com/docker/compose/releases
安装:
1、把下载的安装包上传到服务器的/usr/local/bin/目录下,增加执行权限
chmod a+x docker-compose
2、测试是否成功
docker-compose --version
二、在线安装
CentOS Docker 安装 | 菜鸟教程
|