testcontainers-scala icon indicating copy to clipboard operation
testcontainers-scala copied to clipboard

ContainerLaunchException with Docker Compose V2

Open cuong-dang opened this issue 2 years ago • 5 comments

I encountered the following error for sbt test.

org.testcontainers.containers.ContainerLaunchException: Local Docker Compose exited abnormally with code 1 whilst running command: up -d

Solved by unchecking the option Use Docker Compose V2 in Docker General settings.

cuong-dang avatar Oct 28 '21 07:10 cuong-dang

I'm also seeing this issue, but downgrading the version of docker-compose didn't fix the problem.

drewboardman avatar Nov 10 '21 15:11 drewboardman

Same problem for me despite downgrading docker-compose version from V3 -> V2. It succeeds in local test with sbt, but needs to do the docker compose manually before the first launch. The problem remains in Jenkins CI, any suggestions please?

hosnimed avatar Mar 02 '22 10:03 hosnimed

I believe the issue has been solved with the above change. Please review.

necosta avatar Apr 26 '22 06:04 necosta

@dimafeng Do you have a plan to release 0.40.7?

pan3793 avatar Apr 27 '22 05:04 pan3793

Sorry for the delay. Just released

dimafeng avatar Apr 27 '22 17:04 dimafeng

https://github.com/testcontainers/testcontainers-java/pull/5608 added support for compose v2 with ComposeContainer, which is available in testcontainers-java:1.19.0, @dimafeng do you have time to make a release for this project?

pan3793 avatar Aug 24 '23 13:08 pan3793

@pan3793 I can take a look this weekend. If you happen to have some time to submit a PR earlier, I'd really appreciate it.

dimafeng avatar Aug 24 '23 14:08 dimafeng

@dimafeng Thanks, not too urgent on my side, I temporarily created a docker-compose script to simulate the V1 compose as a workaround, it works well for a while.

~/bin$ cat docker-compose
#/usr/bin/env bash
docker compose $@

pan3793 avatar Aug 24 '23 14:08 pan3793

Sorry, the version upgrade didn't go smoothly https://github.com/testcontainers/testcontainers-scala/pull/258. I need somebody to figure out the problem.

dimafeng avatar Aug 28 '23 01:08 dimafeng