-
Notifications
You must be signed in to change notification settings - Fork 98
Open
Description
The Rootfs image can't be used as base image since any attempt to RUN commands fails with:
0.323 runc run failed: unable to start container process: error during container init: error mounting "/var/lib/docker/buildkit/executor/resolv.conf" to rootfs at "/etc/resolv.conf": create mountpoint for /etc/resolv.conf mount: make mountpoint "/etc/resolv.conf": file exists
Test case:
$ cat Dockerfile
FROM openwrt/rootfs
RUN mkdir /root/test
CMD [ "/sbin/init" ]
Test run:
$ docker build .
> [2/2] RUN mkdir /root/test:
0.135 runc run failed: unable to start container process: error during container init: error mounting "/var/lib/docker/buildkit/executor/resolv.conf" to rootfs at "/etc/resolv.conf": create mountpoint for /etc/resolv.conf mount: make mountpoint "/etc/resolv.conf": file exists
------
Dockerfile:3
--------------------
1 | FROM openwrt/rootfs
2 |
3 | >>> RUN mkdir /root/test
4 |
5 | CMD [ "/sbin/init" ]
--------------------
ERROR: failed to solve: process "/bin/sh -c mkdir /root/test" did not complete successfully: exit code: 1
Proposed solution: Don't include /etc/resolv.conf in the rootfs image. The file seems unnecessary since Docker mounts it's own version of the file anyway.
Metadata
Metadata
Assignees
Labels
No labels