set the "COPY rootfs /" statement to be the last COPY statement during packaging stage

This commit is contained in:
Ricard Bejarano 2019-04-23 08:55:36 +02:00
parent 9c74bb78b6
commit 3ff01a74bd
No known key found for this signature in database
GPG key ID: 5A5105DD6B91CA19
2 changed files with 4 additions and 4 deletions

View file

@ -60,8 +60,6 @@ RUN cd /tmp/nginx && \
FROM scratch
COPY rootfs /
COPY --from=build /lib/x86_64-linux-gnu/libc.so.6 \
/lib/x86_64-linux-gnu/libcrypt.so.1 \
/lib/x86_64-linux-gnu/libdl.so.2 \
@ -74,6 +72,8 @@ COPY --from=build /lib64/ld-linux-x86-64.so.2 \
/lib64/
COPY --from=build /tmp/nginx/objs/nginx /nginx
COPY rootfs /
STOPSIGNAL SIGTERM
ENTRYPOINT ["/nginx", "-g", "daemon off;"]

View file

@ -59,10 +59,10 @@ RUN cd /tmp/nginx && \
FROM scratch
COPY rootfs /
COPY --from=build /tmp/nginx/objs/nginx /nginx
COPY rootfs /
STOPSIGNAL SIGTERM
ENTRYPOINT ["/nginx", "-g", "daemon off;"]