Open kenyon opened 1 year ago
This should be focused. According to the `documentation docker-compose v1 is going to loose support after june 2023.
@kenyon I am currently working on this.
Should we consider 'dropping support' for v1 and remove the code base?
@vegaaz since v1 is unsupported upstream, removing support in this module would be 👍 from me.
docker-ce ships with a version of docker-compise on /usr/libexec/docker/cli-plugins/docker-compose but the module doesnt use it by default since its not on the standard path. If you change your path to include /usr/libexec/docker/cli-plugins/ before running puppet then docker_compose will find it and use it.
So all that needs to be done is adjust the default path used by the docker_compose resource But Im not sure how to do that.
/usr/libexec
is not supposed to be in PATH
. I think it's best to stick with installing docker-compose-plugin
per upstream documentation.
Also, at least with Ubuntu and Red Hat packages provided by Docker, /usr/libexec/docker/cli-plugins/docker-compose
is provided by the docker-compose-plugin
package, not the docker-ce
package.
Ok, the docker-compose is installed by the docker-compose-plugin package, not docker-ce itself. But even though it is installed, the docker module won't use it.
How do we get the module to use it if we dont change the path. Should the module create a link to it in /usr/local/bin?
I checked the upstream documentation, which recommends installing the plugin package. But even when you do that, the module doesnt use it.
I checked the upstream documentation, which recommends installing the plugin package. But even when you do that, the module doesnt use it.
That's the point of this issue. The module needs to be updated so that it uses docker compose
(with a space).
A temporary solution that works for my use case is adding a script that redirects to compose plugin :
file { '/usr/bin/docker-compose':
ensure => file,
mode => '0755',
content => 'docker compose "$@"',
}
docker_compose { 'my_compose':
...
}
Use Case
The
docker_compose
resource in this module should support the Docker Compose plugin.Describe the Solution You Would Like
The
docker_compose
resource uses docker-compose-plugin rather than failing withError: Could not find a suitable provider for docker_compose
.Describe Alternatives You've Considered
Installing standalone Docker Compose would be an alternative, but that is not supported by upstream per https://docs.docker.com/compose/install/ and upstream provides
docker-compose-plugin
as packages per https://docs.docker.com/compose/install/linux/.Additional Context
See also: #839