Skip to content

High performance self-hosted photo and video management solution.

fix(ml): disable core dumps (#5770)

Mert09402eb6d077
diff --git a/machine-learning/Dockerfile b/machine-learning/Dockerfile
index 1c95eae196..81a7be5892 100644
--- a/machine-learning/Dockerfile
+++ b/machine-learning/Dockerfile
@@ -25,6 +25,11 @@ ENV NODE_ENV=production \
PATH="/opt/venv/bin:$PATH" \
PYTHONPATH=/usr/src
+# prevent core dumps
+RUN echo "hard core 0" >> /etc/security/limits.conf && \
+ echo "fs.suid_dumpable 0" >> /etc/sysctl.conf && \
+ echo 'ulimit -S -c 0 > /dev/null 2>&1' >> /etc/profile
+
COPY --from=builder /opt/venv /opt/venv
COPY start.sh log_conf.json ./
COPY app .