removed no cache from apk add command so it would work faster for development purposes

This commit is contained in:
2025-11-17 20:06:48 +00:00
parent 34414f0686
commit a55e81292c

View File

@@ -3,8 +3,8 @@ FROM alpine:3.22 AS builder
ENV NGINX_VERSION=1.29.3 ENV NGINX_VERSION=1.29.3
# Build dependencies # Build dependencies (the --no-cache has been removed for development reasons add it later after apk add part)
RUN apk add --no-cache \ RUN apk add \
build-base pcre2-dev zlib-dev openssl-dev linux-headers curl gnupg tar build-base pcre2-dev zlib-dev openssl-dev linux-headers curl gnupg tar
WORKDIR /tmp WORKDIR /tmp
@@ -37,7 +37,8 @@ RUN make install
FROM alpine:3.22 FROM alpine:3.22
# Runtime dependencies # Runtime dependencies
RUN apk add --no-cache pcre2 zlib openssl ca-certificates libcap curl RUN apk add \
pcre2 zlib openssl ca-certificates libcap curl
RUN adduser -D -g 'nginx' nginx RUN adduser -D -g 'nginx' nginx
RUN mkdir -p /var/cache/nginx /etc/nginx/conf.d /etc/nginx/stream_conf.d /usr/share/nginx/html /var/run RUN mkdir -p /var/cache/nginx /etc/nginx/conf.d /etc/nginx/stream_conf.d /usr/share/nginx/html /var/run
RUN chown -R nginx:nginx /var/cache/nginx /var/run /etc/nginx /usr/share/nginx/html RUN chown -R nginx:nginx /var/cache/nginx /var/run /etc/nginx /usr/share/nginx/html