testcontainers / testcontainers/testcontainers-java

Creating images on the fly from a builder does not support authenticated pulls

Open
#5,354 11 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

resolution/waiting-for-info
Dominant language
Java
Stars
8.7k
Forks
1.9k
Avg merge
2d 17h
Merged PRs (30d)
9

Description

I'm attempting to use "Creating images on the fly" to build an image based on an existing image.
While ImageFromDockerfile supports authenticated pre-pulls in many cases (based on parsing the Dockerfile), it currently doesn't appear to do so when withDockerfileFromBuilder is used.
In this case, since the from I'm passing to the builder uses a repository that's authenticated with a credStore (Docker Desktop on Mac), I get an error com.github.dockerjava.api.exception.DockerClientException: Could not build image: Head "<PARENT_IMAGE_URL>": no basic auth credentials

https://www.testcontainers.org/features/creating_images/

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 the ImageFromDockerfile and withDockerfileFromBuilder entry points described in the issue, then review the creating-images documentation. Reproduce a builder-based build using an authenticated parent image with a Docker credStore; done means the parent pull authenticates successfully and the image build completes.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, java
Domain
devops, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.