diff --git a/build/Dockerfile b/build/Dockerfile index 5fe588196..e804fd3a5 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 029e7018c..8347a7eba 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 066e8139f..e9bec0e7e 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 dc61747a2..270ac3e20 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 c552e7b79..68626acbe 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 4318978cc..8783e5da3 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 ed4a95115..736d3f089 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/ \ + /etc/nginx \ + /opt/app_protect/ \ + /usr/share/ts \ + /var/cache/nginx \ + /var/lib/nginx/ \ + /var/log/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 49971da4a..207633220 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 ece754e40..2ed8b504e 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