docker compose 的安装

Windows和Mac在默认安装了docker desktop以后,docker-compose随之自动安装

  1. PS C:\Users\Peng Xiao\docker.tips> docker-compose --version
  2. docker-compose version 1.29.2, build 5becea4c

Linux用户需要自行安装

最新版本号可以在这里查询 https://github.com/docker/compose/releases

  1. $ sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
  2. $ sudo chmod +x /usr/local/bin/docker-compose
  3. $ docker-compose --version
  4. docker-compose version 1.29.2, build 5becea4c

熟悉python的朋友,可以使用pip去安装docker-Compose

  1. $ pip install docker-compose