-
Notifications
You must be signed in to change notification settings - Fork 523
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
Use project name in Compose commands in the Container panel #2755
Comments
Using Inspect on the containers, the project name can be found in the Config/Labels section:
|
Related to (but not the same as) #2633 |
Should be straightforward to fix, as @petergloor points out the project name is available from the label |
Love it, thanks @petergloor!!! |
This fix is now released with Docker extension version 1.12.0. |
Issue Type: Feature Request
Whenever I start a project using Docker: compose up from the command palette (ctrl+shift+P) it starts a project using the name of the directory that contains the docker-compose.yml file. The name of this project appears in the Containers panel. A right mouse click provides the commands Compose Logs, Compose Restart and Compose Down. So far this works fine.
However, in case I start
docker compose -p <project name> up
using an alternative project name from a Terminal window, the project name will be the one provided with the -p parameter and not the projects directory name.In this case the Compose commands in the Containers panel will fail, because the parameter -p with the right project name is missing in the docker-compose command executed under the hood.
Note: of course it's always possible to execute the commands from a terminal window, but especially when using remote contexts it would be nice if the commands would be available.
Extension version: 1.10.0
VS Code version: Code 1.54.1 (f30a9b73e8ffc278e71575118b6bf568f04587c8, 2021-03-04T22:38:50.094Z)
OS version: Linux x64 5.8.0-44-generic
Remote OS version: Linux x64 5.4.0-66-generic
The text was updated successfully, but these errors were encountered: