centos: CentOS Linux release 7.6.1810 (Core)
docker:Docker version 18.09.6, build 481bc77156
docker-compose:docker-compose version 1.24.1, build 4667896
安装docker
# yum 包更新
[root@centos7 ~]# yum update
# 卸载旧版本 Docker
[root@centos7 ~]# yum remove docker docker-common docker-selinux docker-engine
# 安装软件包
[root@centos7 ~]# yum install -y yum-utils device-mapper-persistent-data lvm2
# 添加 Docker yum源
[root@centos7 ~]# yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
# 安装 Docker
[root@centos7 ~]# yum -y install docker-ce
# 启动 Docker
[root@centos7 ~]# systemctl start docker
# 查看 Docker 版本号
[root@centos7 ~]# docker --version
安装docker-compose
# 安装 docker-compose
[root@centos7 ~]# curl -L https://github.com/docker/compose/releases/download/1.24.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
[root@centos7 ~]# chmod +x /usr/local/bin/docker-compose
# 查看 docker-compose 版本号
[root@centos7 ~]# docker-compose version
网友评论