-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add --exclude to docker-compose up #4133
Comments
Is it common that you'd want to start a regular subset? If so then perhaps using |
Judging by the fact that Compose already supports starting a subset, I would say that it's common enough. Many other commands, not only |
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 👍 from me for --exclude. But that --exclude should also override dependencies - if I don't want to start something it should never start :) |
I'm facing the same situation as @pmzajaczkowski. Having this feature is quite useful when testing microservices locally. |
+1 on suggestion. Definitely useful for my team |
+1 |
1 similar comment
+1 |
+1 My use case is that we have a handful of microservices, and I'm developing one of them. I want to |
Second that. |
This would be super helpful. Would appreciate if you guys consider this for a future release. |
+1 |
Workaround:
|
+1 |
10 similar comments
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
pls |
+1 This would be super useful! |
Workaround #2:
the advantage is that you can have a fancy grep pattern, like exclude frontend-* or keep only *db. |
+1 |
While this can be deployed using
it would be far more useful to be able to specify a service that needs to be specified explicitly through a |
I'd prefer to see an option for both cases: e.g. I have a site in a container dependent on a running nginx service, but both are "disabled" from running through a standard |
+1 |
+1 This would be very useful for me too. My use case is most of the time I want to run all services in my Only sometimes do I want to run literally everything in my |
@Rohaq I believe you meant |
You can split your yml into two, moving the often offending service there.
When you need, you combine both yml.
…--
Fernando 🐼
On Fri, 15 Nov 2019, 21:23 Tom Caflisch, ***@***.***> wrote:
+1 This would be very useful for me too.
My use case is most of the time I want to run all services in my
docker-compose.yml file except one b/c it's a service that is a resource
hog and is only need when i'm testing pieces of my app locally.
Only sometimes do I want to run literally everything in my
docker-compose.yml file.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#4133?email_source=notifications&email_token=AABJDLQSZTAW2JIOQGWVJBTQT4HMXA5CNFSM4CVXDOWKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEGYFLI#issuecomment-554533549>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABJDLQRUWWCKLFG44E6TBLQT4HMXANCNFSM4CVXDOWA>
.
|
Run into similar need today. +1 |
+1 |
+1 |
1 similar comment
+1 |
+1 is not helpful and is only email spam for those who are following this issue... |
my use case is similar but different enough to mention. I'd like to --exclude from docker-compose log. There's one chatty service I'm not interested in seeing but rather than listing all services, it'd be useful to --exclude the one. |
@eliam inverse grep will filter for you |
Yes, thanks, I'm familiar. I'd normally be following these logs, i.e."docker-compose -f --tail=5" but irrespective, I'm not sure producing output to ignore is how I'd go, if --exclude functionality existed. |
There's a proposal for profiles in Compose that potentially can fill this gap. Feel free to check it out and contribute to the discussion here: compose-spec/compose-spec#97 |
see: docker#4133 Signed-off-by: hm-jaschenl <johann.aschenloher0@hm.edu>
You should rely on profile to group services by usage scenario, so that you can easily enable/disable those |
Sorry, but I believe profiles (e.g. test, debug) has a different use case than what was described in the thread.
What do you recommend? A different profile for each possible exclusion? Not sure if that makes sense. |
This indeed is a pretty common scenario, and most users enable remote debugger port in their service definition to cover this need, so they don't have to tweak the compose file. |
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 dodocker-compose up --exclude srv9 srv10
. Useful syntactic sugar IMO.The text was updated successfully, but these errors were encountered: