Merge pull request #3476 from aledbf/fix-docker-permissions
Fix nginx directory permissions
This commit is contained in:
commit
7b79341670
1 changed files with 2 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue