From c4d6e8f55d9f0d5c1df65885508b4c53096ac866 Mon Sep 17 00:00:00 2001 From: Manuel Alejandro de Brito Fontes Date: Tue, 27 Nov 2018 23:05:18 -0300 Subject: [PATCH] Fix nginx directory permissions --- rootfs/Dockerfile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/rootfs/Dockerfile b/rootfs/Dockerfile index 86775644d4..360d802561 100644 --- a/rootfs/Dockerfile +++ b/rootfs/Dockerfile @@ -22,13 +22,12 @@ RUN clean-install \ diffutils \ libcap2-bin -COPY . / +COPY --chown=www-data:www-data . / # Fix permission during the build to avoid issues at runtime # with volumes (custom templates) RUN bash -eu -c ' \ writeDirs=( \ - /etc/nginx/template \ /etc/ingress-controller/ssl \ /etc/ingress-controller/auth \ /var/log \ @@ -38,9 +37,7 @@ RUN bash -eu -c ' \ for dir in "${writeDirs[@]}"; do \ mkdir -p ${dir}; \ chown -R www-data.www-data ${dir}; \ - done' \ - && chown www-data.www-data /etc/nginx/nginx.conf \ - && chown www-data.www-data /etc/nginx/opentracing.json + done' RUN setcap cap_net_bind_service=+ep /nginx-ingress-controller \ && setcap -v cap_net_bind_service=+ep /nginx-ingress-controller