Skip to content

dockerCompose笔记

xiaoke_1256 edited this page Feb 7, 2020 · 2 revisions

Home >> docker相关笔记 >> docker compose 笔记

  1. 安装docker compose:
#先安装pip
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
sudo python get-pip.py    # 运行安装脚本
pip --version #验证pip安装情况
sudo pip install -U docker-compose # 安装docker-compose
sudo docker-compose version #验证安装情况
  1. 运行docker compose 首先编辑好docker-compose.yml文件.然后再docker-compose.yml文件所在目录执行一下命令:
sudo docker-compose up -d
  1. 停止docker compose
sudo docker-compose down