sbt-docker-compose icon indicating copy to clipboard operation
sbt-docker-compose copied to clipboard

Support docker-compose 2.x

Open candidtim opened this issue 2 years ago • 3 comments

docker-compose 2.x changed the naming convention for containers: it uses dash - to separate the project and container names, instead of underscore _ that was used in 1.x. As a consequence, getDockerContainerId cannot find the containers because it assume the older naming convention.

This is a proposal to support both naming conventions, probably using a flag to switch between the two.

Relevant code from "docker compose": https://github.com/docker/compose/blob/0062703bea796eca5b5f78a4779fa166cc18619c/pkg/compose/compose.go#L36

candidtim avatar Jun 07 '22 15:06 candidtim

My attempt to fix this issue is in PR #125

serhiip avatar Aug 11 '22 08:08 serhiip

Second this fix, it's blocking my ability to use this plugin! PR has been open since August...

dakaneye avatar Dec 12 '22 23:12 dakaneye

As a workaround you can either export COMPOSE_COMPATIBILITY=true in your bash profile or disable V2 in the Docker settings.

bcarter97 avatar Feb 21 '23 11:02 bcarter97