testcontainers / testcontainers/testcontainers-java
Container from dockerfile won't build over missing file for copy
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 8.7k
- Forks
- 1.9k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 9
Description
Dear maintainers
I'm currently using testcontainers 1.14.3
Following instructions from https://www.testcontainers.org/features/creating_images/, the following code won't produce a valid docker image
new ImageFromDockerfile(IMAGE + ":" + RandomStringUtils.randomAlphabetic(15))
.withFileFromPath(".", dockerfile)
.withDockerfile(Paths.get("load/Dockerfile"))
Log states
COPY failed: stat /var/lib/docker/tmp/docker-builder795849804/load: no such file or directory
while dockerfile path points to a directory containing ./load
I don't get any message showing that content is sent to docker build context, why .withFileFromPath(".", dockerfile) isn't catching anything?
What am I doing wrong?
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 the ImageFromDockerfile entry point and the documented creating-images example, then reproduce the provided withFileFromPath and withDockerfile setup using load/Dockerfile. Inspect the Docker build context and confirm that the referenced load directory is included; the issue is done when the COPY step succeeds and produces a valid image.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, java
- Domain
- devops, testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100