testcontainers / testcontainers/testcontainers-java

Docker Compose support doesn't see local Docker images

Open
#239 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted resolution/acknowledged
Dominant language
Java
Stars
8.7k
Forks
1.9k
Avg merge
2d 17h
Merged PRs (30d)
9

Description

I have a project where I've attempted to do the following:

  1. Build an image of the project's application, locally (without pushing into a registry);
  2. Set up an integration test suite that runs after the image has been built;
  3. Have a test case in that suite that uses TestContainer's Compose support to launch a composition that uses the image from step 1.

This however doesn't work, because TestContainers runs Compose inside a container, and it evidently doesn't see the image that's locally built on step 1.

Another symptom of this same problem is that the Compose container, every time it runs, pulls public images afresh from Docker Hub even though they are locally cached on the Docker host.

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

The issue names no source files or tests. Start by reproducing the Compose support flow with a locally built image and a cached Docker Hub image, then trace how the Compose container is launched. Done means Compose can use local host images and does not unnecessarily pull images that are already available.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, docker-compose, java
Domain
devops, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.