testcontainers / testcontainers/testcontainers-java

Cannot use containerized `DockerComposeContainer` if a remote Docker daemon is specified

Open
#3,225 9 comments 3 reactions 0 assignees View on GitHub

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:

  1. Create a test case that uses DockerComposeContainer (as described in https://www.testcontainers.org/modules/docker_compose/).
  2. Set the DOCKER_HOST environment variable to the location of a remote Docker daemon.
  3. Ensure docker.client.strategy=org.testcontainers.dockerclient.EnvironmentAndSystemPropertyClientProviderStrategy
  4. Run the test case.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.