From 231a7d62b6bb3bcff1af6c4c484896045b01cfc2 Mon Sep 17 00:00:00 2001 From: Alex Kaminskii Date: Fri, 26 Aug 2022 15:25:14 +0200 Subject: [PATCH] fix(chore) Dockerfile like in dev (as Rajesh said) --- scripts/dockerfiles/nginx/Dockerfile | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/scripts/dockerfiles/nginx/Dockerfile b/scripts/dockerfiles/nginx/Dockerfile index a2b93ed3e..45fef3550 100644 --- a/scripts/dockerfiles/nginx/Dockerfile +++ b/scripts/dockerfiles/nginx/Dockerfile @@ -1,9 +1,6 @@ -# Dockerfile - alpine -# https://github.com/openresty/docker-openresty - -ARG RESTY_IMAGE_BASE="alpine" -ARG RESTY_IMAGE_TAG="3.16" +FROM openresty/openresty:1.21.4.1-alpine +RUN apk add --no-cache curl # Adding prometheus monitoring support ADD https://raw.githubusercontent.com/knyar/nginx-lua-prometheus/master/prometheus.lua /usr/local/openresty/lualib/ @@ -14,4 +11,10 @@ RUN chmod 0644 /usr/local/openresty/lualib/*.lua # Enabling monitoring on port 9145 # Warning: don't expose this port to public network COPY nginx.conf /usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/conf/nginx.conf -RUN chmod 0644 /usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/conf/nginx.conf +COPY default.conf /etc/nginx/conf.d/default.conf +COPY compression.conf /etc/nginx/conf.d/compression.conf +COPY location.list /etc/nginx/conf.d/location.list +RUN chmod 0644 /usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/conf/nginx.conf + +RUN chown -R 1001 /var/run/openresty /usr/local/openresty +USER 1001