From 196dce995d742ed3e5ba08e75fb602e33ae0381e Mon Sep 17 00:00:00 2001 From: Joe Groocock Date: Tue, 4 Sep 2018 19:09:16 +0100 Subject: [PATCH] Reduce layer count, prevent extra layer size --- Dockerfile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5b750db..7ff3ff7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -109,6 +109,11 @@ RUN ${PREFIX}/sbin/ldconfig -r ${PREFIX} && \ # Copy UTC localtime to output cp /usr/share/zoneinfo/Etc/UTC etc/ +# Add default skeleton configuration files +COPY skel/ . +RUN install -dm 1777 tmp && \ + chroot . chmod 775 usr/bin/* sbin/* + # ============= FROM scratch @@ -134,10 +139,6 @@ WORKDIR / SHELL ["/bin/sh", "-exc"] COPY --from=builder /output/ / -# Add default skeleton configuration files -COPY skel/ / -RUN chmod 1777 /tmp && \ - chmod 775 /usr/bin/* ENV ENV="/etc/profile" ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/bin