diff --git a/pkg/docker-compose/build.go b/pkg/docker-compose/build.go index 05cbb5b..d23db02 100644 --- a/pkg/docker-compose/build.go +++ b/pkg/docker-compose/build.go @@ -43,7 +43,8 @@ func (m *Mixin) Build(ctx context.Context) error { dockerComposeVersion = dockerComposeDefaultVersion } - dockerfileLines := fmt.Sprintf(`ADD --chmod=755 https://github.com/docker/compose/releases/download/v%s/docker-compose-linux-x86_64 /usr/local/bin/docker-compose`, dockerComposeVersion) + dockerfileLines := fmt.Sprintf(`ADD --chmod=755 https://github.com/docker/compose/releases/download/v%s/docker-compose-linux-x86_64 /usr/local/lib/docker/cli-plugins/docker-compose +ENV PATH="$PATH:/usr/local/lib/docker/cli-plugins"`, dockerComposeVersion) fmt.Fprintln(m.Out, dockerfileLines) diff --git a/pkg/docker-compose/build_test.go b/pkg/docker-compose/build_test.go index 778127b..70826ac 100644 --- a/pkg/docker-compose/build_test.go +++ b/pkg/docker-compose/build_test.go @@ -11,7 +11,8 @@ import ( ) func TestMixin_Build(t *testing.T) { - const buildOutput = `ADD --chmod=755 https://github.com/docker/compose/releases/download/v2.10.2/docker-compose-linux-x86_64 /usr/local/bin/docker-compose + const buildOutput = `ADD --chmod=755 https://github.com/docker/compose/releases/download/v2.10.2/docker-compose-linux-x86_64 /usr/local/lib/docker/cli-plugins/docker-compose +ENV PATH="$PATH:/usr/local/lib/docker/cli-plugins" ` t.Run("build", func(t *testing.T) {