diff --git a/docker/agents/Dockerfile b/docker/agents/Dockerfile index f58af00..e27afc5 100644 --- a/docker/agents/Dockerfile +++ b/docker/agents/Dockerfile @@ -1,7 +1,7 @@ FROM debian:bookworm-slim RUN apt-get update && apt-get install -y --no-install-recommends \ - bash curl git jq tmux cron python3 python3-pip openssh-client ca-certificates age shellcheck \ + bash curl git jq tmux cron python3 python3-pip openssh-client ca-certificates age shellcheck procps \ && pip3 install --break-system-packages networkx \ && rm -rf /var/lib/apt/lists/* diff --git a/lib/formula-session.sh b/lib/formula-session.sh index e6c6aae..b23c62d 100644 --- a/lib/formula-session.sh +++ b/lib/formula-session.sh @@ -44,6 +44,11 @@ acquire_cron_lock() { # Exits 0 (skip) if available memory is below MIN_MB (default 2000). check_memory() { local min_mb="${1:-2000}" + # Graceful fallback if free command is not available (procps not installed) + if ! command -v free &>/dev/null; then + log "run: free not found, skipping memory check" + return 0 + fi local avail_mb avail_mb=$(free -m | awk '/Mem:/{print $7}') if [ "${avail_mb:-0}" -lt "$min_mb" ]; then