From 09402eb6d0773678ef8dc84474b7bd2db1fa6d2c Mon Sep 17 00:00:00 2001 From: Mert <101130780+mertalev@users.noreply.github.com> Date: Sat, 16 Dec 2023 21:30:29 -0500 Subject: [PATCH] fix(ml): disable core dumps (#5770) * update dockerfile * remove sysctl line --- machine-learning/Dockerfile | 5 +++++ 1 file changed, 5 insertions(+) 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 .