diff --git a/Dockerfile b/Dockerfile index f34f8a2548..f7bbb9ad10 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,7 @@ ENV NEXT_TELEMETRY_DISABLED=1 # en wordt de gedownloade pnpm-binary ook in de runtime-image bewaard. RUN --mount=type=cache,target=/var/cache/apk \ --mount=type=cache,target=/root/.npm \ - apk add --no-cache git bash \ + apk add --no-cache git bash util-linux \ && npm install -g corepack@0.36.0 \ && corepack enable pnpm diff --git a/scripts/with-memory-cap.sh b/scripts/with-memory-cap.sh index 58c9d0207f..ce95c55a4e 100755 --- a/scripts/with-memory-cap.sh +++ b/scripts/with-memory-cap.sh @@ -193,7 +193,11 @@ run_ulimit() { echo "[mem-cap] ulimit -v $virtual_kb werd geweigerd" >&2 return 1 } - exec taskset -c "$cpu_affinity" "$@" + if command -v taskset >/dev/null 2>&1; then + exec taskset -c "$cpu_affinity" "$@" + else + exec "$@" + fi } run_refuse() { @@ -204,7 +208,11 @@ run_refuse() { run_opted_out() { echo "[mem-cap] WAARSCHUWING: plafond bewust uitgeschakeld, dit commando kan de machine laten OOM-killed worden: $*" >&2 - exec taskset -c "$cpu_affinity" "$@" + if command -v taskset >/dev/null 2>&1; then + exec taskset -c "$cpu_affinity" "$@" + else + exec "$@" + fi } case "$backend" in