Skip to content

withLocalCompose(false) not working for version 3 of local-compose.yml #492

@rrrrrrrrramba

Description

@rrrrrrrrramba

I am trying to figure out why DockerComposeContainer configured as withLocalCompose(false) is not working.

I have a very simple docker-compose.yml:

version: "3"
services:
  postgresql:
    image: "postgres:10"
    ports:
      - 5432

I start as following:

new DockerComposeContainer(...).withLocalCompose(false).withPull(false).starting(null)

I get the following generic error:

20:45:31.061 [main] ERROR 🐳 [docker/compose:1.8.0] - Could not start container
java.lang.IllegalStateException: Container did not start correctly.
	at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:231)
	at org.testcontainers.containers.GenericContainer.lambda$start$0(GenericContainer.java:184)
	at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:76)
	at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:182)
	at org.testcontainers.containers.ContainerisedDockerCompose.invoke(DockerComposeContainer.java:432)
	at org.testcontainers.containers.DockerComposeContainer.runWithCompose(DockerComposeContainer.java:152)
	at org.testcontainers.containers.DockerComposeContainer.createServices(DockerComposeContainer.java:128)
	at org.testcontainers.containers.DockerComposeContainer.starting(DockerComposeContainer.java:112)

When using withLocalCompose(true), it works fine.

Docker version: Docker version 17.09.0-ce, build afdb6d4

Any idea what is wrong or what I can do to investigate this? The strange this is that a few days ago, something similar was working. I am 100% sure that I was testing with withLocalCompose(false), as I remember intentionally deleting docker-compose on my host to verify that everything was running in a container, as expected. I remember being amazed (as this would avoid installing docker-compose on CI servers) ;). However, I cannot really see what is different now.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions