Skip to content

Commit 7399d22

Browse files
jnoordsijthresheek
authored andcommitted
Replace COPY with bind mount in default modules example
1 parent 6cb3307 commit 7399d22

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

modules/Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,11 @@ RUN set -ex \
7070
&& echo "BUILT_MODULES=\"$BUILT_MODULES\"" > /tmp/packages/modules.env
7171

7272
FROM ${NGINX_FROM_IMAGE}
73-
COPY --from=builder /tmp/packages /tmp/packages
74-
RUN set -ex \
73+
RUN --mount=type=bind,target=/tmp/packages/,source=/tmp/packages/,from=builder \
74+
set -ex \
7575
&& apt update \
7676
&& . /tmp/packages/modules.env \
7777
&& for module in $BUILT_MODULES; do \
7878
apt install --no-install-suggests --no-install-recommends -y /tmp/packages/nginx-module-${module}_${NGINX_VERSION}*.deb; \
7979
done \
80-
&& rm -rf /tmp/packages \
8180
&& rm -rf /var/lib/apt/lists/

0 commit comments

Comments
 (0)