-
-
Notifications
You must be signed in to change notification settings - Fork 251
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
The claim "Docker [...] Works out of the box." is no longer true.
That is because docker now uses BuildKit per default, while the BuildKit Dockerfile syntax is not supported when building docker images with testcontainers-node (e.g. with GenericContainer.fromDockerfile(buildContext).build())
When building a Dockerfile containing BuildKit-features e.g.
RUN--mount=type=cache,id=maven,target=/root/.m2/repository mvn --batch-mode --no-transfer-progress dependency:resolve dependency:resolve-plugins
through testcontains-node (with export 'DEBUG=testcontainers*'), the output currently looks like:
2023-05-12T08:52:02.265Z testcontainers:build [localhost/43420fa7dc4a:2c9e53cede2c] {"errorDetail":{"message":"the --mount option requires BuildKit. Refer to https://docs.docker.com/go/buildkit/ to learn how to build images with BuildKit enabled"},"error":"the --mount option requires BuildKit. Refer to https://docs.docker.com/go/buildkit/ to learn how to build images with BuildKit enabled"}
Exporting export DOCKER_BUILDKIT=1 does not change the problem/output.
PS: Sibling issue in testcontainers-java: testcontainers/testcontainers-java#2857
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request