You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, on Linux (Ubuntu 22.04 and 20.04) we have started seeing a problem in our Docker builds where multiple files hardlinked to the same inode in the same context directory will cause an error in the build. The problem only appears as of buildkit version 0.13 and later.
To reproduce (for some working directory tmp_dir) the error prepare a directory with two hardlinked files and a simple Dockerfile as follows,
mkdir {tmp_dir}/Scratch
cd {tmp_dir}/Scratch
cat <<EOF > Dockerfile
FROM alpine
ARG bin=bin
WORKDIR /app
ENTRYPOINT ["ls"]
CMD ["-ial"]
ADD \${bin} /app
EOF
mkdir bin
touch bim
ln bim bin/failplz
then invoke a build sudo buildctl build --frontend gateway.v0 --opt source=docker/dockerfile --local context={tmp_dir}/Scratch/ --local dockerfile={tmp_dir}/Scratch
and observe the error Failed to solve: invalid link bin/failplz to unknown path: "bim".
This also happens when running docker build where docker-buildx-plugin has version 0.13.
Reproducing this issue is also dependent on the top-level filename. If I rename it to "bio" for example (lexicographically later than the "bin" directory) and hardlink from that the build succeeds.
Hello, on Linux (Ubuntu 22.04 and 20.04) we have started seeing a problem in our Docker builds where multiple files hardlinked to the same inode in the same context directory will cause an error in the build. The problem only appears as of buildkit version 0.13 and later.
To reproduce (for some working directory tmp_dir) the error prepare a directory with two hardlinked files and a simple Dockerfile as follows,
then invoke a build
sudo buildctl build --frontend gateway.v0 --opt source=docker/dockerfile --local context={tmp_dir}/Scratch/ --local dockerfile={tmp_dir}/Scratch
and observe the error
Failed to solve: invalid link bin/failplz to unknown path: "bim"
.This also happens when running
docker build
where docker-buildx-plugin has version 0.13.Reproducing this issue is also dependent on the top-level filename. If I rename it to "bio" for example (lexicographically later than the "bin" directory) and hardlink from that the build succeeds.
It looks like this error only starts appearing as of #4094 and arises from within fsutil https://github.com/tonistiigi/fsutil/blob/master/hardlinks.go#L41.
Many thanks in advance.
The text was updated successfully, but these errors were encountered: