docker-compose up for only certain containers

前端 未结 7 610
盖世英雄少女心
盖世英雄少女心 2020-12-22 20:31

I have a docker-compose.yml which contain several containers. Three of them are for my app (client, server and database) and the rest are for various dev tools

7条回答
  •  無奈伤痛
    2020-12-22 21:04

    I actually had a very similar challenge on my current project. That broght me to the idea of writing a small script which I called docker-compose-profile (or short: dcp). I published this today on GitLab as docker-compose-profile. So in short: I now can start several predefined docker-compose profiles using a command like dcp -p some-services "up -d". Feel free to try it out and give some feedback or suggestions for further improvements.

提交回复
热议问题