安装Docker
Docker 软件包已经包括在默认的 CentOS-Extras 软件源里。因此想要安装 docker,只需要运行下面的 yum 命令:yum install docker
启动 Docker 服务
[root@localhost ~] systemctl start docker.service
[root@localhost ~] systemctl enable docker.service
安装docker-compose
在安装docker-compose之前首先检查是否安装了python-pip
终端输入
[root@localhost ~] pip -v
确认没有安装python-pip包则以此执行
[root@localhost ~] yum -y install epel-release
[root@localhost ~] yum -y install python-pip
[root@localhost ~] pip install --upgrade pip
[root@localhost ~] pip install docker-compose --ignore-installed requests
[root@localhost ~] docker-compose -version
当有版本提示则说明安装完成