Use authbind to bind privileged ports

This commit is contained in:
Manuel de Brito Fontes 2018-08-03 09:50:53 -04:00 committed by Manuel Alejandro de Brito Fontes
parent e2f5d9066e
commit b148f113ae
No known key found for this signature in database
GPG key ID: 786136016A8BA02A
14 changed files with 48 additions and 69 deletions

View file

@ -20,14 +20,13 @@ WORKDIR /etc/nginx
RUN clean-install \
diffutils \
libcap2-bin \
dumb-init
COPY . /
# Fix permission during the build to avoid issues at runtime
# with volumes (custom templates)
RUN bash -eux -c ' \
RUN bash -eu -c ' \
writeDirs=( \
/etc/nginx/template \
/etc/ingress-controller/ssl \
@ -41,9 +40,11 @@ RUN bash -eux -c ' \
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 \
&& chown www-data.www-data /etc/nginx
&& chown www-data.www-data /etc/nginx/opentracing.json
ENTRYPOINT ["/entrypoint.sh"]
# Create symlinks to redirect nginx logs to stdout and stderr docker log collector
# This only works if nginx is started with CMD or ENTRYPOINT
RUN ln -sf /dev/stdout /var/log/nginx/access.log
RUN ln -sf /dev/stderr /var/log/nginx/error.log
CMD ["/nginx-ingress-controller"]