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

(Optionally) ask for project name at Docker compose start #2418

Closed
rugk opened this issue Oct 16, 2020 · 4 comments
Closed

(Optionally) ask for project name at Docker compose start #2418

rugk opened this issue Oct 16, 2020 · 4 comments
Assignees

Comments

@rugk
Copy link

rugk commented Oct 16, 2020

Use case: If you use Docker compose, you may have multiple project names for one docker-compose.yml in order to start/stop different "instances".
I want to quickly switch between them/execute them, preferably with Ctrl+Shift+P.

Solution: Docker has the COMPOSE_PROJECT_NAME variable or -p parameter for this.

Suggestion: It would be great if you could ask for the project name (at least optionally) when you try to run one of the Docker compose commands.

@bwateratmsft
Copy link
Contributor

You may find this useful for your use case: https://code.visualstudio.com/docs/containers/reference#_command-customization

You could customize several different Compose Up commands and choose which one you want to run.

@rugk
Copy link
Author

rugk commented Oct 16, 2020

Indeed, thanks, this is a nice solution too, for now.
However, it seems to be missing docker.commands.composeRestart, i.e. the quite handy "Docker compose restart" command.
It asks for these then (one time for up and one for down), but that is not really convenient.

@dbreshears dbreshears added this to the Future milestone Oct 19, 2020
@karolz-ms
Copy link
Contributor

Docker will be adding project name as a Compose spec property: compose-spec/compose-spec#106

I believe this will cover your needs @rugk, but if not, or if you have other suggestions, please share!

@rugk
Copy link
Author

rugk commented Oct 20, 2020

Thanks, yeah. That does it exactly! 😃

@bwateratmsft bwateratmsft removed this from the Future milestone Oct 20, 2020
@vscodebot vscodebot bot locked and limited conversation to collaborators Dec 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants