Docker-compose exclude service by default

后端 未结 3 1446
栀梦
栀梦 2021-02-14 03:59

If I have a great many services defined in a docker-compose project, how can I exclude a service from the default docker-compose up command?

For example, I

3条回答
  •  谎友^
    谎友^ (楼主)
    2021-02-14 04:15

    Not exactly what you're looking for but you could use the scale flag to scale your ssl service to zero:

    docker-compose up --scale ssl_service=0
    

    Another option is to have multiple compose files and run docker with the -f flag to start specific services.

提交回复
热议问题