File tree Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -64,18 +64,24 @@ COPY dojo/ ./dojo/
6464RUN env DD_SECRET_KEY='.' DD_DJANGO_DEBUG_TOOLBAR_ENABLED=True python3 manage.py collectstatic --noinput --verbosity=2 && true
6565
6666FROM nginx:1.29.1-alpine3.22@sha256:42a516af16b852e33b7682d5ef8acbd5d13fe08fecadc7ed98605ba5e3b26ab8
67- ARG uid=1001
68- ARG appuser=defectdojo
67+ ARG uid=101
68+ ARG gid=101
6969COPY --from=collectstatic /app/static/ /usr/share/nginx/html/static/
7070COPY wsgi_params nginx/nginx.conf nginx/nginx_TLS.conf /etc/nginx/
7171COPY docker/entrypoint-nginx.sh /
7272RUN \
73- apk add --no-cache openssl && \
73+ apk add --no-cache openssl
74+ RUN \
7475 chmod -R g=u /var/cache/nginx && \
76+ chown -R ${uid}:${gid} /var/cache/nginx && \
7577 mkdir /var/run/defectdojo && \
7678 chmod -R g=u /var/run/defectdojo && \
79+ chown -R ${uid}:${gid} /var/run/defectdojo && \
80+ chmod -R g=u /run/defectdojo && \
81+ chown -R ${uid}:${gid} /run/defectdojo && \
7782 mkdir -p /etc/nginx/ssl && \
7883 chmod -R g=u /etc/nginx && \
84+ chown -R ${uid}:${gid} /etc/nginx && \
7985 true
8086ENV \
8187 DD_UWSGI_PASS="uwsgi_server" \
8692 NGINX_METRICS_ENABLED="false" \
8793 METRICS_HTTP_AUTH_USER="" \
8894 METRICS_HTTP_AUTH_PASSWORD=""
89- USER ${uid}
95+ USER ${uid}:${gid}
9096EXPOSE 8080
9197ENTRYPOINT ["/entrypoint-nginx.sh"]
Original file line number Diff line number Diff line change @@ -19,8 +19,13 @@ services:
1919 NGINX_METRICS_ENABLED : " ${NGINX_METRICS_ENABLED:-false}"
2020 DD_UWSGI_HOST : " ${DD_UWSGI_HOST:-uwsgi}"
2121 DD_UWSGI_PORT : " ${DD_UWSGI_PORT:-3031}"
22+ read_only : true
2223 volumes :
2324 - defectdojo_media:/usr/share/nginx/html/media
25+ tmpfs :
26+ - /run/defectdojo:uid=101,gid=101
27+ - /var/cache/nginx:uid=101,gid=101
28+ - /etc/nginx/ssl:uid=101,gid=101
2429 ports :
2530 - target : 8080
2631 published : ${DD_PORT:-8080}
You can’t perform that action at this time.
0 commit comments