Open bra-fsn opened 3 years ago
/cc @tonistiigi - was this the issue you're looking into?
Yes it should be related to https://github.com/moby/buildkit/pull/1963
Can confirm the same behavious of Fedora 33 with docker version 20.10.3 with overlay2 .
It happens occasionally though, I rebuild images many times a day, and it will occur once or twice a day at most.
Expected behavior
I would expect cache volumes to be working during image builds.
Actual behavior
When having
RUN --mount=id=root_.cache,type=cache,target=/root/.cache aws codeartifact login --tool pip --repository python --domain s1-packages --domain-owner REDACTED && pip3 install -r /tmp/requirements3.txt && rm -f ~/.config/pip/pip.conf
in myDockerfile
, the image build dies with:ERROR: error committing fz55z5fyasu7npprdw7t4cfwz: invalid mutable ref 0xc0044e2a00: invalid: executor failed running [/bin/sh -c aws codeartifact login --tool pip --repository python --domain s1-packages --domain-owner REDACTED && pip3 install -r /tmp/requirements3.txt && rm -f ~/.config/pip/pip.conf]: stat /var/lib/docker/overlay2/fz55z5fyasu7npprdw7t4cfwz: no such file or directory
If I add
sharing=private
to the cache mount, the error disappears.Steps to reproduce the behavior
I guess placing the above solely into a
Dockerfile
may not trigger this, so some other conditions must be met. I can see this after upgrading to the current docker version (previous was 19.x). I could observe this withaufs
, but before reporting, switched tooverlay2
.Output of
docker version
:Output of
docker info
:Additional environment details (AWS, VirtualBox, physical, etc.) AWS EC2 node