fix(docker): remove default nginx configs
Delete the packaged nginx config files after installing nginx so the image uses the application-provided configuration.
This commit is contained in:
parent
0917bb7b8e
commit
6ceb444cf4
2 changed files with 3 additions and 0 deletions
|
|
@ -41,6 +41,7 @@ RUN set -eux; \
|
|||
grep -qxF "@nginx ${NGINX_REPOSITORY}" /etc/apk/repositories || echo "@nginx ${NGINX_REPOSITORY}" >> /etc/apk/repositories; \
|
||||
curl -fsSL https://nginx.org/keys/nginx_signing.rsa.pub -o /etc/apk/keys/nginx_signing.rsa.pub; \
|
||||
apk add --no-cache --upgrade "nginx@nginx=${NGINX_VERSION}"; \
|
||||
rm -f /etc/nginx/nginx.conf /etc/nginx/conf.d/default.conf; \
|
||||
nginx -v
|
||||
|
||||
RUN docker-php-serversideup-set-id www-data $USER_ID:$GROUP_ID && \
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ RUN set -eux; \
|
|||
grep -qxF "@nginx ${NGINX_REPOSITORY}" /etc/apk/repositories || echo "@nginx ${NGINX_REPOSITORY}" >> /etc/apk/repositories; \
|
||||
curl -fsSL https://nginx.org/keys/nginx_signing.rsa.pub -o /etc/apk/keys/nginx_signing.rsa.pub; \
|
||||
apk add --no-cache --upgrade "nginx@nginx=${NGINX_VERSION}"; \
|
||||
rm -f /etc/nginx/nginx.conf /etc/nginx/conf.d/default.conf; \
|
||||
nginx -v
|
||||
|
||||
ARG USER_ID
|
||||
|
|
@ -90,6 +91,7 @@ RUN set -eux; \
|
|||
grep -qxF "@nginx ${NGINX_REPOSITORY}" /etc/apk/repositories || echo "@nginx ${NGINX_REPOSITORY}" >> /etc/apk/repositories; \
|
||||
curl -fsSL https://nginx.org/keys/nginx_signing.rsa.pub -o /etc/apk/keys/nginx_signing.rsa.pub; \
|
||||
apk add --no-cache --upgrade "nginx@nginx=${NGINX_VERSION}"; \
|
||||
rm -f /etc/nginx/nginx.conf /etc/nginx/conf.d/default.conf; \
|
||||
nginx -v
|
||||
|
||||
RUN docker-php-serversideup-set-id www-data $USER_ID:$GROUP_ID && \
|
||||
|
|
|
|||
Loading…
Reference in a new issue