nerdctl installed with rootless containerd and buildkit fails to build dockerfiles when the dockerfile specified is a full path:
Simple Repro
Create test Dockerfile in your root directory (Dockerfile):
FROM alpine
RUN apk -U add curl
Run the following
$ nerdctl build -f $(realpath Dockerfile) .
[+] Building 0.1s (2/2) FINISHED
=> [internal] load build definition from /tmp/tmp.gdczD7DusJ/Dockerfile 0.1s
=> => transferring dockerfile: 2B 0.0s
=> [internal] load .dockerignore 0.1s
=> => transferring context: 2B 0.0s
error: failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to read dockerfile: open /tmp/buildkit-mount044783237/tmp/tmp.gdczD7DusJ/Dockerfile: no such file or directory
FATA[0000] unrecognized image format
nerdctlinstalled with rootless containerd and buildkit fails to build dockerfiles when the dockerfile specified is a full path:Simple Repro
Create test Dockerfile in your root directory (
Dockerfile):Run the following