Jobs Making Use of Docker Layer Caching and --mount=type=cache fail with the error: no such file or directory

Jobs making use of --mount=type=cache running a docker build can fail with the following error:

failed to solve with frontend dockerfile.v0: failed to solve with frontend gateway.v0: rpc error: code = Unknown desc = failed to build LLB: executor failed running [/bin/sh -c test]: stat /var/lib/docker/overlay2/XXXXXXXXXXXXXXXX: no such file or directory

To solve this issue, increment the id field. Change:

--mount=type=cache,id=v1

to:

--mount=type=cache,id=v2
Was this article helpful?
1 out of 1 found this helpful

Comments

0 comments

Article is closed for comments.