mariotoffia / FluentDocker

Use docker, docker-compose local and remote in tests and your .NET core/full framework apps via a FluentAPI
Apache License 2.0
1.31k stars 97 forks source link

Problem with docker compose V2 support. #312

Open malylemireflo opened 3 months ago

malylemireflo commented 3 months ago

Seems docker-compose command should be updated to docker compose in V2. https://docs.docker.com/compose/migrate/ Base command should check for .AssumeComposeVersion(ComposeVersion.V2) and remove the hyphen. I get some errors with the newest docker compose and the command with hypen. See https://askubuntu.com/questions/1508129/docker-compose-giving-containerconfig-errors-after-update-today

rsaugier commented 2 months ago

Hello. I also get errors when using "docker-compose". More precisely this python error: KeyError: 'ContainerConfig'. It seems like we're not the only ones and some people on the net seem to have solved this error by using docker compose instead of docker-compose. I suppose on some systems (say Windows with Docker Desktop) docker-compose can be an alias to docker compose (ie V2). But on others (say in my case a Linux build agent in a popular commercial continuous integration service), it is possible that docker-compose points to V1 and docker compose is the only way to go to have V2. So yes, fixing FluentDocker by using docker compose instead of docker-compose is probably the right thing to do. I could try to take a look if nobody handles this, but not immediately.

mariotoffia commented 2 months ago

Hi @rsaugier and @malylemireflo I need to take care of this. Put it on my TODO list and will fix it during my vacation this summer.

Cheers, Mario

ben-wilson-mews commented 1 month ago

@mariotoffia Just FYI github have deprecated docker-compose in the base action images as of July 29th (with a slow rollout). We were hit today. Currently looking into a solution

ben-wilson-mews commented 1 month ago

For anyone who needs a quick shim until support lands:

ln -s /usr/libexec/docker/cli-plugins/docker-compose /usr/local/bin/docker-compose
discoaaron commented 1 month ago

@mariotoffia Just FYI github have deprecated docker-compose in the base action images as of July 29th (with a slow rollout). We were hit today. Currently looking into a solution

More info here https://github.com/actions/runner-images/issues/9692

RSR-SE commented 1 month ago

For anyone who needs a quick shim until support lands:

ln -s /usr/libexec/docker/cli-plugins/docker-compose /usr/local/bin/docker-compose

Thanks a lot @ben-wilson-mews this one saved my life :-) I'm still too busy and the code of the lib looks quite complex so I lazily didn't attempt to fix this myself. In any case this is not a blocking point anymore for us thanks to this great symlink workaround.