-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
up --scale
not working on 2.0.1
#8752
Comments
To modify the number of replicas with the If you only want to start the helloworld service, just run |
@Shikachuu thanks for your answer. Very interesting. So this is a breaking change to v1 then? Is it intended? If yes I will adapt my scripts to take this into considerations, but is it really an intended change? |
I might not be the best person to answer this, because I only keep a close eye on this project since v2. |
I had similar expectations coming to v2 from v1. I normally ran
where normally I don't want to run the To get similar behaviour, I can
I can see some reasoning for this, but I think |
Without specifying the services, it is perfectly valid reasoning, I can see why someone might want to do that. |
Another differences: if you use --scale svc=0 this service will not be started even it is a dependency of one of the started services? but if you just not started that service (as @Shikachuu suggested) that service will be started if it is a dependency. Any chance to get back this functionality? |
Tbh this "workaround" sounds like you don't want to use the rules you set... |
What rules? Not sure that I understand you. It is also unclear to me why you called "workaround" the behavior that was supported several years in a row. "Dependency" is a specific mechanism that was introduced to achieve multi purpose, I need one aspect and do not need another, as to me - fair enough. Nevertheless, I have a need to start or not to start several services (depending on current need), there was a way to do that.. And that works like a charm. I do not know any other suitable built-in features that allows me to do the same. I tried profiles, but it does not work smoothly, I've noticed multiple issues with that. Therefore, Do we have any chance to get back this functionality? |
Hi. Another vote for allowing to start all containers except the ones with We are using this in an internal tool to start different groups on containers sequentially and as @allanlei mentions it would be quite inconvenient to specify all services to start (I don't think we actually have them currently since users can specify their own compose files). Also, I know we had some unexpected behavior in some cases using that approach (specifying the services we want to start), so it would be great if we can keep the current way. This is currently a blocker for us to support v2 and causing some pain due to v2 being enabled by default on Mac. Any chance we can get a word on the intention to fix/support this behavior or not? Thanks. |
We have a similar issue with groups. version: "3.4"
services:
subset1:
image: tianon/true
restart: "no"
depends_on:
- service1
- service2
service1:
image: tianon/true
restart: "no"
service2:
image: tianon/true
restart: "no"
$ docker-compose up --scale service1=0 subset1
Creating network "docker-compose-test_default" with the default driver
Creating docker-compose-test_service2_1 ... done
Creating docker-compose-test_subset1_1 ... done
Attaching to docker-compose-test_subset1_1
docker-compose-test_subset1_1 exited with code 0
$ echo $?
0
$ docker compose up --scale service1=0 subset1
[+] Running 3/3
⠿ Network docker-compose-test_default Created 0.1s
⠿ Container docker-compose-test-service2-1 Created 0.2s
⠿ Container docker-compose-test-subset1-1 Created 0.1s
Attaching to docker-compose-test-subset1-1
no containers to start
$ echo $?
1 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This is not stale. Maintainers: gentle urge to reconsider the stale bot. What value is there in closing legitimate issues just because they haven’t seen any attention in a few months? |
This issue has been automatically marked as not stale anymore due to the recent activity. |
Description
docker compose up --scale name=num
always reports "unknown service: name"Steps to reproduce the issue:
With docker-compose version 1.29.2 it works as expected:
Describe the results you received:
Error:
unknown service "scalable"
Describe the results you expected:
scalable service will not be started, all others should
Additional information you deem important (e.g. issue happens only occasionally):
Output of
docker compose version
:Output of
docker info
:The text was updated successfully, but these errors were encountered: