Stubborn buildx error: mounting "overlay" to rootfs at "/var/lib/buildkit/runc-overlayfs/executor/bnlx2eoyoa5lq8oie878pvqss/rootfs/dest" caused: no such file or directory
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 4.5k
- Forks
- 682
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 29
Description
Sorry I haven't been able to reduce this to a small reproducible example but is anyone else getting mounting "overlay" to rootfs ... no such fileerrors like below?
I just started using buildx to make multiplatform images. Getting the failure on a simple COPY command in my Dockerfile. It builds fine with docker build ... (non-multiplatform).
Running Docker for Mac 3.3.1. I get the failure even when building only linux/amd64, I removed linux/arm64.
docker buildx build --push --platform linux/amd64 --progress=plain --build-arg=... --secret id=sshknownhosts,src=.../known_hosts --secret id=sshpriv,src=.../.ssh/id_mygitkey -t=192.168.1.50:5000/myimage:mytag myimage)
...
#46 sha256:f8242732b621eb082cade21e7b6545ac733b9fd14649a7be1a27ccd92283e764
#46 CACHED
#47 [stage-2 34/40] COPY socat.service /etc/systemd/system/socat.service
#47 sha256:bbdce2136343d1ab75457a330c556412b3c9e7e6ff75e67aa2265c9db2b3bbca
#47 0.079 container_linux.go:367: starting container process caused: process_linux.go:495: container init caused: rootfs_linux.go:60: mounting "overlay" to rootfs at "/var/lib/buildkit/runc-overlayfs/executor/6ptgmfj4a5oclrgp6phoispsb/rootfs/dest" caused: no such file or directory
#47 ERROR: executor failed running [copy /src-0/socat.service etc/systemd/system/socat.service]: exit code: 1
------
> [stage-2 34/40] COPY socat.service /etc/systemd/system/socat.service:
------
error: failed to solve: rpc error: code = Unknown desc = executor failed running [copy /src-0/socat.service etc/systemd/system/socat.service]: exit code: 1
I'm building a multiplatform docker image, pulling in some files from other builds.
ARG REGISTRY_URL
ARG MYIMAGE_BRANCH_TAG
...
FROM ${REGISTRY_URL}myimage-src:${MYIMAGE_BRANCH_TAG} AS my-image-src
FROM ${REGISTRY_URL}ui:${CSUI_GIT_BUILD} AS my-ui
FROM centos:7.9.2009
RUN mkdir /deliverables
ARG MYIMAGE_BRANCH_TAG
COPY --from=my-image-src /deliverables/*.rpm /deliverables/
...
ARG UI_GIT_BUILD
COPY --from=my-ui /deliverables/*.rpm /deliverables/
...
RUN yum install -y socat && yum clean all
# Used when using systemd (instead of starting socats in foreground in /myinit.sh)
COPY socat.service /etc/systemd/system/socat.service
...
COPY myinit.sh /myinit.sh
RUN chmod +x /myinit.sh
COPY supervisord.conf.in /supervisord.conf.in
...
CMD ["/myinit.sh"]
I've tried building with --no-cache, doesn't help. Tried deleting and recreating the builder, doesn't help. Tried docker system prune --volumes, doesn't help.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reported Docker for Mac 3.3.1 command and the shown Dockerfile, especially the multi-stage COPY commands and the failing socat.service COPY. Compare the multiplatform docker buildx path with the successful non-multiplatform docker build, using the plain-progress output to isolate the failure. Done would require a reproducible cause and a confirmed resolution, but the issue does not specify one.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, dockerfile
- Domain
- build-system, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100