From 70330d88073aa9e249880aad99ffd029d1d4f1cf Mon Sep 17 00:00:00 2001 From: Maxim Skokov Date: Fri, 10 Jul 2026 02:34:07 +0300 Subject: [PATCH] Dockerfile.rootfs: drop dangling /etc/resolv.conf symlink The rootfs image ships /etc/resolv.conf as a symlink to /tmp/resolv.conf. In a build context /tmp is empty, so the symlink dangles and older buildkit fails any RUN step on the image with: make mountpoint "/etc/resolv.conf": file exists when it tries to bind-mount the build-time resolv.conf over it. Docker injects its own /etc/resolv.conf at runtime regardless, so the shipped symlink serves no purpose in the container image. Remove it in the builder stage before it is copied into the final scratch image. Verified with `docker save` that no layer contains etc/resolv.conf after the change, and that DNS still resolves at runtime via Docker's mounted resolv.conf (nslookup downloads.openwrt.org succeeds). Fixes: https://github.com/openwrt/docker/issues/191 Signed-off-by: Maxim Skokov --- Dockerfile.rootfs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile.rootfs b/Dockerfile.rootfs index 64807a6..a8a9fc6 100644 --- a/Dockerfile.rootfs +++ b/Dockerfile.rootfs @@ -18,6 +18,8 @@ COPY --chmod=0755 setup.sh /builder/setup.sh RUN /builder/setup.sh +RUN rm -f /builder/rootfs/etc/resolv.conf + FROM scratch ARG CMD=/bin/ash