Refactor entrypoint to avoid issues with volumes
This commit is contained in:
parent
71abdf76d0
commit
69a2a27170
2 changed files with 27 additions and 16 deletions
|
|
@ -25,6 +25,25 @@ RUN clean-install \
|
|||
|
||||
COPY . /
|
||||
|
||||
# Fix permission during the build to avoid issues at runtime
|
||||
# with volumes (custom templates)
|
||||
RUN bash -eux -c ' \
|
||||
writeDirs=( \
|
||||
/etc/nginx/template \
|
||||
/etc/ingress-controller/ssl \
|
||||
/etc/ingress-controller/auth \
|
||||
/var/log \
|
||||
/var/log/nginx \
|
||||
/tmp \
|
||||
); \
|
||||
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 \
|
||||
&& chown www-data.www-data /etc/nginx
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
||||
CMD ["/nginx-ingress-controller"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue