testcontainers / testcontainers/testcontainers-java
Cannot use containerized `DockerComposeContainer` if a remote Docker daemon is specified
Open
Nobody has claimed this yet.
area/docker-compose
resolution/acknowledged
type/enhancement
- Dominant language
- Java
- Stars
- 8.7k
- Forks
- 1.9k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 9
Description
A ContainerLaunchException with the following message is thrown by ContainerisedDockerCompose on startup if a remote Docker daemon is used:
Could not start container
Log output from the failed container:
.FileNotFoundError: [Errno 2] No such file or directory: <path to Docker compose file>
To reproduce:
- Create a test case that uses DockerComposeContainer (as described in https://www.testcontainers.org/modules/docker_compose/).
- Set the DOCKER_HOST environment variable to the location of a remote Docker daemon.
- Ensure docker.client.strategy=org.testcontainers.dockerclient.EnvironmentAndSystemPropertyClientProviderStrategy
- Run the test case.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with DockerComposeContainer and ContainerisedDockerCompose startup handling, then reproduce the issue using DOCKER_HOST with EnvironmentAndSystemPropertyClientProviderStrategy. Trace how the Docker Compose file path is made available to the remote daemon; done means the described test starts successfully against a remote Docker daemon.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, docker-compose, java
- Domain
- devops, testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100