dockertest
dockertest copied to clipboard
dockertest does not support buildkit
Preflight checklist
- [X] I could not find a solution in the existing issues, docs, nor discussions.
- [X] I agree to follow this project's Code of Conduct.
- [X] I have read and am following this repository's Contribution Guidelines.
- [X] I have joined the Ory Community Slack.
- [X] I am signed up to the Ory Security Patch Newsletter.
Ory Network Project
No response
Describe the bug
Dockertest does not yet support BuildKit (docker buildx
) for building images from a Dockerfile. For example, when I try to use dockertest to build my backend server for testing I get this failure:
$ go test -C integration/
failed to build and run backend container: the --mount option requires BuildKit. Refer to https://docs.docker.com/go/buildkit/ to learn how to build images with BuildKit enabled
BuildKit is widely used for building docker images. https://github.com/ory/dockertest/pull/416 was proposed over a year ago but it has not yet been merged. Could that change plus whatever other support is needed be prioritized?
Reproducing the bug
- Write a Dockerfile with a step that attempts to mount a file. For example:
RUN --mount=type=secret,id=netrc_file go build ...
- Attempt to build the image using one of dockertest's build methods, such as:
container, err := pool.BuildAndRunWithOptions("path/to/Dockerfile", runOpts, hostConfigModifier)
Relevant log output
No response
Relevant configuration
No response
Version
github.com/ory/dockertest/v3 v3.10.0
On which operating system are you observing this issue?
None
In which environment are you deploying?
None
Additional Context
No response