docker-compose up for only certain containers

前端 未结 7 611
盖世英雄少女心
盖世英雄少女心 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 20:47

    One good solution is to run only desired services like this:

    docker-compose up --build $(

    and services.txt file look like this:

    services1 services2, etc
    

    of course if dependancy (depends_on), need to run related services together.

    --build is optional, just for example.

提交回复
热议问题