Skip to content

Commit

Permalink
config: prefer compose CLI plugin over docker-compose binary
Browse files Browse the repository at this point in the history
Now that Fedora has packaged docker-compose v2, /usr/bin/docker-compose
is provided by the docker-compose-switch project which is a shim that
translates `docker-compose ...` into `docker compose ...` while
translating any deprecated CLI arguments into the new compose v2
counterparts.

This has been a problem for podman users that have podman-docker
installed, because `podman compose` tries to call the
docker-compose-switch shim and the shim assumes that `docker compose`
will be provided by the actual docker command that calls the appropriate
CLI plugin, not a podman wrapper that tries to call the docker-compose
shim again, resulting in an endless loop.

Changing `podman compose` to prefer calling the docker-compose CLI
plugin directly should fix this issue.

Ref: https://discussion.fedoraproject.org/t/conflicts-when-trying-to-install-docker-compose-having-podman-and-podman-docker-already-installed/132760/
Ref: https://bugzilla.redhat.com/show_bug.cgi?id=2316333
Signed-off-by: Maxwell G <[email protected]>
  • Loading branch information
gotmax23 committed Oct 6, 2024
1 parent bedd170 commit 71ab760
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/config/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,12 @@ var (
additionalHelperBinariesDir string

defaultUnixComposeProviders = []string{
"docker-compose",
"$HOME/.docker/cli-plugins/docker-compose",
"/usr/local/lib/docker/cli-plugins/docker-compose",
"/usr/local/libexec/docker/cli-plugins/docker-compose",
"/usr/lib/docker/cli-plugins/docker-compose",
"/usr/libexec/docker/cli-plugins/docker-compose",
"docker-compose",
"podman-compose",
}

Expand Down

0 comments on commit 71ab760

Please sign in to comment.