Skip to content

Commit 6a0917a

Browse files
authored
Named build stage
1 parent 09a0f90 commit 6a0917a

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Dockerfile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ ARG CONFIG="\
6060
--add-module=/tmp/lua-nginx-module-${LUA_NGINX_MODULE_VERSION} \
6161
"
6262

63-
FROM alpine:3.12
63+
FROM alpine:3.12 AS base
6464
LABEL maintainer="NGINX Docker Maintainers <docker-maint@nginx.com>"
6565

6666
ARG NGINX_VERSION
@@ -172,13 +172,13 @@ ARG NGINX_VERSION
172172
ARG NGX_BROTLI_COMMIT
173173
ARG LUA_NGINX_MODULE_VERSION
174174

175-
COPY --from=0 /tmp/runDeps.txt /tmp/runDeps.txt
176-
COPY --from=0 /etc/nginx /etc/nginx
177-
COPY --from=0 /usr/lib/nginx/modules/*.so /usr/lib/nginx/modules/
178-
COPY --from=0 /usr/sbin/nginx /usr/sbin/nginx-debug /usr/sbin/
179-
COPY --from=0 /usr/share/nginx/html/* /usr/share/nginx/html/
180-
COPY --from=0 /usr/bin/envsubst /usr/local/bin/envsubst
181-
COPY --from=0 /etc/ssl/dhparam.pem /etc/ssl/dhparam.pem
175+
COPY --from=base /tmp/runDeps.txt /tmp/runDeps.txt
176+
COPY --from=base /etc/nginx /etc/nginx
177+
COPY --from=base /usr/lib/nginx/modules/*.so /usr/lib/nginx/modules/
178+
COPY --from=base /usr/sbin/nginx /usr/sbin/nginx-debug /usr/sbin/
179+
COPY --from=base /usr/share/nginx/html/* /usr/share/nginx/html/
180+
COPY --from=base /usr/bin/envsubst /usr/local/bin/envsubst
181+
COPY --from=base /etc/ssl/dhparam.pem /etc/ssl/dhparam.pem
182182

183183
RUN \
184184
addgroup -S nginx \

0 commit comments

Comments
 (0)