Add --exclude to docker-compose up
Problem
I have a Compose file with 10 services. I want to start only 8 of them. I can do `docker-compose up srv1 srv2 srv3 srv4 srv5 srv6 srv7 srv8` but it would be better to do `docker-compose up --exclude srv9 srv10`. Useful syntactic sugar IMO.
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: Add --exclude to docker-compose up
For my team it's very common to start all services apart of particular one. That's the case where you are developing some microservices and want to run all of them on your machine (using docker-compose) apart of that single one that you are currently developing and running from your IDE (for example in the debug mode). So that's :+1: from me for --exclude. But that --exclude should also override d
Trust Score
7 verifications
- 1
For my team it's very common to start all services apart of particular one. That
For my team it's very common to start all services apart of particular one. That's the case where you are developing some microservices and want to run all of them on your machine (using docker-compose) apart of that single one that you are currently developing and running from your IDE (for example in the debug mode). So that's :+1: from me for --exclude. But that --exclude should also override dependencies - if I don't want to start something it should never start :)
Validation
Resolved in docker/compose GitHub issue #4133. Community reactions: 35 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep