diff --git a/build/Dockerfile b/build/Dockerfile index 5fe5881969..f3313e09de 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -16,8 +16,8 @@ RUN mkdir -p /var/lib/nginx \ && setcap 'cap_net_bind_service=+ep' /usr/sbin/nginx \ && setcap 'cap_net_bind_service=+ep' /usr/sbin/nginx-debug \ && chown -R nginx:0 /etc/nginx \ - && chown -R nginx:0 /var/cache/nginx \ - && chown -R nginx:0 /var/lib/nginx \ + /var/cache/nginx \ + /var/lib/nginx \ && apt-get remove --purge -y libcap2-bin \ && rm /etc/nginx/conf.d/* \ && rm -rf /var/lib/apt/lists/* diff --git a/build/DockerfileForAlpine b/build/DockerfileForAlpine index 029e7018c7..304cd9ae62 100644 --- a/build/DockerfileForAlpine +++ b/build/DockerfileForAlpine @@ -15,8 +15,8 @@ RUN mkdir -p /etc/nginx/secrets \ && setcap 'cap_net_bind_service=+ep' /usr/sbin/nginx \ && setcap 'cap_net_bind_service=+ep' /usr/sbin/nginx-debug \ && chown -R nginx:0 /etc/nginx \ - && chown -R nginx:0 /var/cache/nginx \ - && chown -R nginx:0 /var/lib/nginx \ + /var/cache/nginx \ + /var/lib/nginx \ && apk del libcap \ && rm /etc/nginx/conf.d/* \ && rm -rf /var/cache/apk/* diff --git a/build/DockerfileForPlus b/build/DockerfileForPlus index 066e8139f9..fa2fadf976 100644 --- a/build/DockerfileForPlus +++ b/build/DockerfileForPlus @@ -55,8 +55,8 @@ RUN mkdir -p /var/lib/nginx \ && mkdir -p /etc/nginx/secrets \ && mkdir -p /etc/nginx/stream-conf.d \ && chown -R nginx:0 /etc/nginx \ - && chown -R nginx:0 /var/cache/nginx \ - && chown -R nginx:0 /var/lib/nginx/ \ + /var/cache/nginx \ + /var/lib/nginx/ \ && apt-get remove --purge -y libcap2-bin \ && rm /etc/nginx/conf.d/* diff --git a/build/DockerfileWithOpentracing b/build/DockerfileWithOpentracing index dc61747a2f..476c10c388 100644 --- a/build/DockerfileWithOpentracing +++ b/build/DockerfileWithOpentracing @@ -82,8 +82,8 @@ RUN mkdir -p /var/lib/nginx \ && setcap 'cap_net_bind_service=+ep' /usr/sbin/nginx \ && setcap 'cap_net_bind_service=+ep' /usr/sbin/nginx-debug \ && chown -R nginx:0 /etc/nginx \ - && chown -R nginx:0 /var/cache/nginx \ - && chown -R nginx:0 /var/lib/nginx \ + /var/cache/nginx \ + /var/lib/nginx \ && apt-get remove --purge -y libcap2-bin \ && rm /etc/nginx/conf.d/* \ && rm -rf /var/lib/apt/lists/* diff --git a/build/DockerfileWithOpentracingForPlus b/build/DockerfileWithOpentracingForPlus index c552e7b79b..5e9fe15019 100644 --- a/build/DockerfileWithOpentracingForPlus +++ b/build/DockerfileWithOpentracingForPlus @@ -71,8 +71,8 @@ RUN mkdir -p /var/lib/nginx \ && mkdir -p /etc/nginx/secrets \ && mkdir -p /etc/nginx/stream-conf.d \ && chown -R nginx:0 /etc/nginx \ - && chown -R nginx:0 /var/cache/nginx \ - && chown -R nginx:0 /var/lib/nginx/ \ + /var/cache/nginx \ + /var/lib/nginx/ \ && apt-get remove --purge -y libcap2-bin \ && rm /etc/nginx/conf.d/* diff --git a/build/appprotect/DockerfileWithAppProtectForPlus b/build/appprotect/DockerfileWithAppProtectForPlus index 4318978cc8..2a0f4a579a 100644 --- a/build/appprotect/DockerfileWithAppProtectForPlus +++ b/build/appprotect/DockerfileWithAppProtectForPlus @@ -83,13 +83,13 @@ RUN mkdir -p /var/lib/nginx \ && mkdir -p /var/log/app_protect \ && mkdir -p /opt/app_protect \ && chown -R nginx:0 /etc/app_protect \ - && chown -R nginx:0 /usr/share/ts \ - && chown -R nginx:0 /etc/nginx \ - && chown -R nginx:0 /var/cache/nginx \ - && chown -R nginx:0 /var/lib/nginx/ \ - && chown -R nginx:0 /var/log/app_protect/ \ - && chown -R nginx:0 /opt/app_protect/ \ - && chown -R nginx:0 /var/log/nginx/ \ + /usr/share/ts \ + /etc/nginx \ + /var/cache/nginx \ + /var/lib/nginx/ \ + /var/log/app_protect/ \ + /opt/app_protect/ \ + /var/log/nginx/ \ && apt-get remove --purge -y libcap2-bin \ && rm /etc/nginx/conf.d/* diff --git a/build/appprotect/DockerfileWithAppProtectForPlusForOpenShift b/build/appprotect/DockerfileWithAppProtectForPlusForOpenShift index ed4a95115f..706b674ad2 100644 --- a/build/appprotect/DockerfileWithAppProtectForPlusForOpenShift +++ b/build/appprotect/DockerfileWithAppProtectForPlusForOpenShift @@ -83,13 +83,13 @@ RUN mkdir -p /var/lib/nginx \ && mkdir -p /var/log/app_protect \ && mkdir -p /opt/app_protect \ && chown -R nginx:0 /etc/app_protect \ - && chown -R nginx:0 /usr/share/ts \ - && chown -R nginx:0 /etc/nginx \ - && chown -R nginx:0 /var/cache/nginx \ - && chown -R nginx:0 /var/lib/nginx/ \ - && chown -R nginx:0 /var/log/app_protect/ \ - && chown -R nginx:0 /opt/app_protect/ \ - && chown -R nginx:0 /var/log/nginx/ \ + /usr/share/ts \ + /etc/nginx \ + /var/cache/nginx \ + /var/lib/nginx/ \ + /var/log/app_protect/ \ + /opt/app_protect/ \ + /var/log/nginx/ \ && rm /etc/nginx/conf.d/* RUN printf "MODULE = ALL;\nLOG_LEVEL = TS_CRIT;\nFILE = 2;\n" > /etc/app_protect/bd/logger.cfg \ diff --git a/build/openshift/Dockerfile b/build/openshift/Dockerfile index 49971da4a4..c2c3ae8f95 100644 --- a/build/openshift/Dockerfile +++ b/build/openshift/Dockerfile @@ -27,8 +27,8 @@ RUN set -x \ && setcap 'cap_net_bind_service=+ep' /usr/sbin/nginx \ && setcap 'cap_net_bind_service=+ep' /usr/sbin/nginx-debug \ && chown -R nginx:0 /etc/nginx \ - && chown -R nginx:0 /var/cache/nginx \ - && chown -R nginx:0 /var/lib/nginx \ + /var/cache/nginx \ + /var/lib/nginx \ && rm /etc/yum.repos.d/nginx.repo \ && rm /etc/nginx/conf.d/* diff --git a/build/openshift/DockerfileForPlus b/build/openshift/DockerfileForPlus index ece754e402..ba6c16911d 100644 --- a/build/openshift/DockerfileForPlus +++ b/build/openshift/DockerfileForPlus @@ -62,8 +62,8 @@ RUN mkdir -p /var/lib/nginx \ && mkdir -p /etc/nginx/secrets \ && mkdir -p /etc/nginx/stream-conf.d \ && chown -R nginx:0 /etc/nginx \ - && chown -R nginx:0 /var/cache/nginx \ - && chown -R nginx:0 /var/lib/nginx/ \ + /var/cache/nginx \ + /var/lib/nginx/ \ && rm /etc/nginx/conf.d/* EXPOSE 80 443