From 0addd3c206e7c95220fce869e2a242c9b34d4fef Mon Sep 17 00:00:00 2001 From: Joe Groocock Date: Wed, 9 Aug 2017 14:06:52 +0100 Subject: [PATCH] Copy missing configuration files from official busybox:glibc container --- Dockerfile | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index ca501b0..76fb4aa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -68,18 +68,21 @@ RUN cp -d glibc-build/out/lib/*.so "${PREFIX}/lib" && \ WORKDIR $PREFIX -# Add root user and group -RUN echo 'root:x:0:0:root:/root:/bin/sh'\\n\ - 'nobody:x:65534:65534:nobody:/:/sbin/nologin' \ - > etc/passwd && \ - echo 'root:::0:::::\nnobody:!::0:::::' \ - > etc/shadow && \ - echo 'root:x:0:root\nnogroup:x:65533\nnobody:x:65544' \ - > etc/group +# Add default skeleton configuration files +RUN for f in passwd shadow group profile; do \ + curl -sSL -O . "https://git.busybox.net/buildroot/plain/system/skeleton/etc/$f"; \ + done && \ + \ + # Copy /etc/localtime to output + ln -vL /etc/localtime etc/ # ============= FROM scratch WORKDIR / + COPY --from=builder /output/ / +RUN mkdir -p /tmp && \ + chmod 1777 /tmp + CMD ["sh"]