-
-
Notifications
You must be signed in to change notification settings - Fork 251
Closed
Description
Expected Behaviour
Given the following
const container = await GenericContainer.fromDockerfile('.', 'build/next.Dockerfile').build()I expect the output to be roughly equivalent to docker build -f build/next.Dockerfile ., ie. build from the next.Dockerfile file located in the build/ folder with the docker context "."
Actual Behaviour
The command fails because the second argument is considered a folder and /Dockerfile is appended. This ultimately results in the error:
Error: ENOTDIR: not a directory, open '/path/to/project/build/next.Dockerfile/Dockerfile'
Testcontainer Logs
...
Steps to Reproduce
- In this environment...
- Any project with custom named Dockerfiles in a subfolder in relation to the context
- With this config...
- Any
- Run '...'
-
const container = await GenericContainer.fromDockerfile('.', 'build/next.Dockerfile').build()
- See error...
-
Error: ENOTDIR: not a directory, open '/path/to/project/build/next.Dockerfile/Dockerfile'
Environment Information
- Operating System: MacOS 15.5
- Docker Version: 28.1.1, build 4eba377
- Node version: v24.0.1
- Testcontainers version: 11.0.0
Metadata
Metadata
Assignees
Labels
No labels