Dockerfile.nginx: only generate pem key if the file does not exist

This commit is contained in:
jums
2025-02-28 08:17:38 +01:00
committed by maxlath
parent a3b10d2674
commit ab286b4968

View File

@@ -1,5 +1,5 @@
FROM nginx
RUN openssl dhparam -out /etc/nginx/dhparam.pem 2048
RUN [ ! -f /etc/nginx/dhparam.pem ] && openssl dhparam -out /etc/nginx/dhparam.pem 2048
RUN mkdir -p /tmp/nginx/tmp /tmp/nginx/resize/img/users /tmp/nginx/resize/img/groups /tmp/nginx/resize/img/entities /tmp/nginx/resize/img/remote /tmp/nginx/resize/img/assets && chown -R nginx:nginx /tmp/nginx