docker-compose安装教程

一、安装

方法一:

curl -L https://github.com/docker/compose/releases/download/1.23.0-rc3/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose

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

curl -L https://github.com/docker/compose/releases/download/1.25.1-rc1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose

方法二:

yum -y install epel-release

yum -y install python-pip

确认版本

pip --version

更新pip

pip install --upgrade pip

安装docker-compose

pip install docker-compose

查看版本

docker-compose version

docker-compose -f docker-compose.yml up -d

docker-compose up -d

重启haproxy这个服务(服务的名称在docker-compose.yaml查看):

docker-compose restart haproxy  

查看日志

docker-compose logs haproxy

posted @ 2020-06-08 16:46  钱哥的博客  阅读(556)  评论(0编辑  收藏  举报