fix: fix: replace cron with while-true loop and gosu in agents entrypoint (#379)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful

This commit is contained in:
Agent 2026-04-08 04:57:57 +00:00
parent 192be70950
commit d8d9acd730
2 changed files with 125 additions and 106 deletions

View file

@ -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 procps \
bash curl git jq tmux python3 python3-pip openssh-client ca-certificates age shellcheck procps gosu \
&& pip3 install --break-system-packages networkx \
&& rm -rf /var/lib/apt/lists/*
@ -26,8 +26,8 @@ COPY . /home/agent/disinto
COPY docker/agents/entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
# Entrypoint runs as root to start the cron daemon;
# cron jobs execute as the agent user (crontab -u agent).
# Entrypoint runs polling loop directly, dropping to agent user via gosu.
# All scripts execute as the agent user (UID 1000) while preserving env vars.
WORKDIR /home/agent/disinto
ENTRYPOINT ["/entrypoint.sh"]