Copy missing configuration files from official busybox:glibc container
This commit is contained in:
parent
3c992fc1b4
commit
0addd3c206
19
Dockerfile
19
Dockerfile
@ -68,18 +68,21 @@ RUN cp -d glibc-build/out/lib/*.so "${PREFIX}/lib" && \
|
|||||||
|
|
||||||
WORKDIR $PREFIX
|
WORKDIR $PREFIX
|
||||||
|
|
||||||
# Add root user and group
|
# Add default skeleton configuration files
|
||||||
RUN echo 'root:x:0:0:root:/root:/bin/sh'\\n\
|
RUN for f in passwd shadow group profile; do \
|
||||||
'nobody:x:65534:65534:nobody:/:/sbin/nologin' \
|
curl -sSL -O . "https://git.busybox.net/buildroot/plain/system/skeleton/etc/$f"; \
|
||||||
> etc/passwd && \
|
done && \
|
||||||
echo 'root:::0:::::\nnobody:!::0:::::' \
|
\
|
||||||
> etc/shadow && \
|
# Copy /etc/localtime to output
|
||||||
echo 'root:x:0:root\nnogroup:x:65533\nnobody:x:65544' \
|
ln -vL /etc/localtime etc/
|
||||||
> etc/group
|
|
||||||
|
|
||||||
# =============
|
# =============
|
||||||
|
|
||||||
FROM scratch
|
FROM scratch
|
||||||
WORKDIR /
|
WORKDIR /
|
||||||
|
|
||||||
COPY --from=builder /output/ /
|
COPY --from=builder /output/ /
|
||||||
|
RUN mkdir -p /tmp && \
|
||||||
|
chmod 1777 /tmp
|
||||||
|
|
||||||
CMD ["sh"]
|
CMD ["sh"]
|
||||||
|
Loading…
Reference in New Issue
Block a user