-
Notifications
You must be signed in to change notification settings - Fork 522
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 a flag to use new Docker Compose command #2977
Comments
@karolz-ms i know that docker compose without dash is part of Docker Desktop, that has versions for Windows and Mac. I don't know if this command will replace the docker-compose, since linux does not have Docker Desktop. I am using vscode-docker as a linux user, and it is working so good. |
@jnsjunior there was a talk about Compose at the DockerCon last week, Nicolas De Ioof was the presenter. He indicated that the https://github.com/docker/compose-cli is the codebase that will be the canonical implementation of Compose in future; also see https://github.com/docker/compose-cli#compose-v2-aka-local-docker-compose You can install the new CLI on Linux too: https://github.com/docker/compose-cli#getting-started |
I'm currently running docker compose v2.1.0 on Fedora 35 and was about to file an issue before finding this. I would love an option so that I can keep manage my docker compose services with VSCode's Docker extension. Docker Compose v2 has been solid for me👍 https://github.com/docker/compose/releases/tag/v2.1.0 |
Related to #3281 |
Maybe also related to #3263. |
Can't this be solved via the command templates? For me the default for "docker.commands.composeUp": [
{
"label": "Compose Up",
"template": "docker-compose ${configurationFile} up ${detached} ${build}",
"contextTypes": [
"moby"
]
},
{
"label": "Compose Up",
"template": "docker compose ${configurationFile} up ${detached}"
}
] so the second one is already compose-v2. Maybe the main command itself could simply be exposed as a setting ( |
I tried editing the command template to be docker compose instead of docker-compose and that didn't change anything. This should be a higher priority now since Docker Desktop became a paid application and the free alternative (docker in WSL2 with port forwarding on windows and just the docker commandline on windows) only supports the docker compose syntax and not the older docker-compose syntax that is only part of the paid Docker Desktop. |
Any progress on this? |
My (temporary) solution was to add a new shell script to my path: #!/usr/bin/env sh
docker compose "${@}" |
The most compatible workaround would be to install compose-switch, which translates changed/deprecated flags. It's still a workaround though... |
I, too, attempted this using the Edit Settings in the VSCode Docker extension settings - which opens up the user-level settings.json file. But as mentioned by others, this doesn't change anything. Is there a different file which must be edited for this to function? If so, it would be helpful for the docs to include that information. |
This is now released in version 1.22 of the Docker extension. |
The latest releases of Docker Desktop include the new implementation of Docker Compose command (
docker compose
with no dash). Currently our extension only uses the olddocker-compose
command when running in the local context.The new command is destined to replace the old one eventually, but at the moment it still may have some bugs, or incompatibilities, and some incompatibilities might never be reconciled. The proposal is then to introduce a setting allowing the user to opt in for the new command, with the idea that sometime in the future we will switch to the new command as a default, and the setting could be then used to opt out of the new command. This should provide the smoothest migration path to the new Docker Compose implementation for our users.
The text was updated successfully, but these errors were encountered: