Skip to content
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

Is there a way to create the service but not start it? #252

Open
sweenu opened this issue Jun 28, 2024 · 4 comments
Open

Is there a way to create the service but not start it? #252

sweenu opened this issue Jun 28, 2024 · 4 comments

Comments

@sweenu
Copy link

sweenu commented Jun 28, 2024

My use case is for game servers. I want the service to be present, but I want to start and stop the service manually when needed, and not have it start every time I deploy my config.

Is there a way to do that? Otherwise, this is a feature request.

@roberth
Copy link
Member

roberth commented Jun 28, 2024

It seems that this is achieved with "Profiles" in Docker Compose, which seems like a simple feature that's easy to support by adding an option for the profiles field.

@roberth
Copy link
Member

roberth commented Jun 28, 2024

More prosaic explanation of the feature: https://docs.docker.com/compose/compose-file/15-profiles/

@sweenu
Copy link
Author

sweenu commented Jun 29, 2024

That's good to now! That would work for my usecase indeed.
Just to be sure, this can't be done currently right ? I can use dcoker-compose.raw but there is no services.<name>.service.raw. Am I missing a way to still do it ?

@sweenu
Copy link
Author

sweenu commented Jun 29, 2024

I also found out that docker-compose has a --no-start option. Could I pass that somehow ? Didn't find the infos.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants