testcontainers / testcontainers/testcontainers-java
`ImageFromDockerfile` not working when `withFileFromFile` and `withDockerfile` are used at the same time
Open
Nobody has claimed this yet.
type/bug
- Dominant language
- Java
- Stars
- 8.7k
- Forks
- 1.9k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 9
Description
Issue
This works as expected
new ImageFromDockerfile(imageName, true)
.withFileFromFile("Dockerfile", new File("dev/keycloak/Dockerfile"))
.withFileFromFile("dev/keycloak/sbt-project", new File("dev/keycloak/sbt-project"))
while this fails to create image and deadlocks on PipedInputStream#awaitSpace()
new ImageFromDockerfile(imageName, true)
.withDockerfile(new File("dev/keycloak/Dockerfile").toPath)
.withFileFromFile("dev/keycloak/sbt-project", new File("dev/keycloak/sbt-project"))
Expected result
At least some kind of warning or exception
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 at ImageFromDockerfile and trace how withDockerfile and withFileFromFile add their inputs, focusing on the PipedInputStream#awaitSpace() deadlock. Reproduce the two fluent-call combinations from the issue and make the conflicting usage produce a warning or exception instead of hanging.
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
- Mostly clear
- Newbie friendliness
- 52/100