From f4bf498c5a5dbd4a2fecd52191d1c2985535181c Mon Sep 17 00:00:00 2001 From: vishu247 <156403229+vishu247@users.noreply.github.com> Date: Wed, 13 Aug 2025 10:20:38 +0530 Subject: [PATCH 1/2] Update Dockerfile-v27 add ulimit -c 0 --- ci-runner/Dockerfile-v27 | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/ci-runner/Dockerfile-v27 b/ci-runner/Dockerfile-v27 index 9eee89368..8c8cee43f 100644 --- a/ci-runner/Dockerfile-v27 +++ b/ci-runner/Dockerfile-v27 @@ -24,6 +24,19 @@ RUN apk update && apk add --no-cache --virtual .build-deps && apk add bash && ap apk --purge -v del py-pip && \ rm /var/cache/apk/* +# Disable core dumps for interactive shells +# 1) Login shells (ash): sourced via /etc/profile.d/*.sh +RUN mkdir -p /etc/profile.d && \ + printf 'ulimit -c 0\n' > /etc/profile.d/disable-core.sh + +# 2) Bash interactive shells: ~/.bashrc and /etc/bash.bashrc +RUN printf 'ulimit -c 0\n' > /etc/bash.bashrc && \ + printf 'ulimit -c 0\n' >> /root/.bashrc + +# 3) Non-login interactive /bin/sh will source $ENV +ENV ENV=/etc/shinit +RUN printf 'ulimit -c 0\n' > /etc/shinit + COPY --from=docker/compose:1.29.2 /usr/local/bin/docker-compose /usr/bin/docker-compose COPY ./buildpack.json /git-ask-pass.sh / From ecc2bb22e412514d6cf924cdbef2059273f89003 Mon Sep 17 00:00:00 2001 From: vishu247 <156403229+vishu247@users.noreply.github.com> Date: Wed, 13 Aug 2025 11:45:20 +0530 Subject: [PATCH 2/2] Update Dockerfile-v27 --- ci-runner/Dockerfile-v27 | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/ci-runner/Dockerfile-v27 b/ci-runner/Dockerfile-v27 index 8c8cee43f..222220394 100644 --- a/ci-runner/Dockerfile-v27 +++ b/ci-runner/Dockerfile-v27 @@ -24,18 +24,16 @@ RUN apk update && apk add --no-cache --virtual .build-deps && apk add bash && ap apk --purge -v del py-pip && \ rm /var/cache/apk/* -# Disable core dumps for interactive shells -# 1) Login shells (ash): sourced via /etc/profile.d/*.sh -RUN mkdir -p /etc/profile.d && \ - printf 'ulimit -c 0\n' > /etc/profile.d/disable-core.sh - -# 2) Bash interactive shells: ~/.bashrc and /etc/bash.bashrc -RUN printf 'ulimit -c 0\n' > /etc/bash.bashrc && \ - printf 'ulimit -c 0\n' >> /root/.bashrc - -# 3) Non-login interactive /bin/sh will source $ENV +# Ensure /bin/sh reads /etc/shinit for interactive shells ENV ENV=/etc/shinit -RUN printf 'ulimit -c 0\n' > /etc/shinit + +# Disable core dumps for login shells, bash, and non-login /bin/sh +RUN set -euo pipefail; \ + mkdir -p /etc/profile.d; \ + printf 'ulimit -c 0\n' > /etc/profile.d/disable-core.sh; \ + printf 'ulimit -c 0\n' > /etc/bash.bashrc; \ + printf 'ulimit -c 0\n' >> /root/.bashrc; \ + printf 'ulimit -c 0\n' > /etc/shinit COPY --from=docker/compose:1.29.2 /usr/local/bin/docker-compose /usr/bin/docker-compose