mirror of
https://github.com/frappe/frappe_docker.git
synced 2024-11-08 14:21:05 +00:00
feat(frappe-nginx): use nginxinc/nginx-unprivileged image
This commit is contained in:
parent
b7d990b2a5
commit
ef31d8e025
@ -44,13 +44,17 @@ RUN git clone --depth 1 https://github.com/frappe/bench /tmp/bench \
|
||||
RUN cp -R apps/frappe/frappe/public/* sites/assets/frappe \
|
||||
&& cp -R apps/frappe/node_modules sites/assets/frappe/
|
||||
|
||||
FROM nginx:latest
|
||||
FROM nginxinc/nginx-unprivileged:latest
|
||||
|
||||
COPY --from=builder /home/frappe/frappe-bench/sites /var/www/html/
|
||||
COPY --from=builder /var/www/error_pages /var/www/
|
||||
COPY build/frappe-nginx/nginx-default.conf.template /etc/nginx/conf.d/default.conf.template
|
||||
COPY build/frappe-nginx/docker-entrypoint.sh /
|
||||
|
||||
USER root
|
||||
|
||||
RUN usermod -u 1000 nginx && groupmod -g 1000 nginx
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install --no-install-recommends -y \
|
||||
rsync \
|
||||
@ -61,5 +65,9 @@ RUN echo "#!/bin/bash" > /rsync \
|
||||
|
||||
VOLUME [ "/assets" ]
|
||||
|
||||
RUN chown -R nginx:nginx /assets /etc/nginx/conf.d/
|
||||
|
||||
USER nginx
|
||||
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
|
Loading…
Reference in New Issue
Block a user