Skip to content

Add support for --profiles to DockerComposeContainer #5041

Closed
@jstanik

Description

@jstanik

When starting DockerComposeContainer (local) with option --profile then this option is not used when down is executed at the end of the test. As a result it does not stop container that was started as a result of using a profile. The down then fails with the error:

org.testcontainers.containers.ContainerLaunchException: Local Docker Compose exited abnormally with code 1 whilst running command: down -v
	at org.testcontainers.containers.LocalDockerCompose.invoke(DockerComposeContainer.java:773)
	at org.testcontainers.containers.DockerComposeContainer.runWithCompose(DockerComposeContainer.java:309)

In my case the true error is probably:

failed to remove network 919...72e: Error response from daemon: error while removing network: network docker-compose_default id 919...72e has active endpoints

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