2026-03-24 18:53:55 +00:00
|
|
|
FROM debian:bookworm-slim
|
|
|
|
|
|
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
|
|
|
bash curl git jq tmux cron python3 openssh-client ca-certificates \
|
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
2026-03-24 20:36:55 +00:00
|
|
|
# Claude CLI — install and verify
|
2026-03-24 18:53:55 +00:00
|
|
|
RUN curl -fsSL https://cli.anthropic.com/install.sh | sh \
|
2026-03-24 20:36:55 +00:00
|
|
|
&& cp "$(find /root -name claude -type f 2>/dev/null | head -1)" /usr/local/bin/claude \
|
|
|
|
|
&& claude --version
|
2026-03-24 18:53:55 +00:00
|
|
|
|
|
|
|
|
# Non-root user
|
|
|
|
|
RUN useradd -m -u 1000 -s /bin/bash agent
|
|
|
|
|
|
|
|
|
|
COPY entrypoint.sh /entrypoint.sh
|
|
|
|
|
RUN chmod +x /entrypoint.sh
|
|
|
|
|
|
2026-03-24 20:30:44 +00:00
|
|
|
# Entrypoint runs as root to start the cron daemon;
|
|
|
|
|
# cron jobs execute as the agent user (crontab -u agent).
|
2026-03-24 18:53:55 +00:00
|
|
|
WORKDIR /home/agent
|
|
|
|
|
|
|
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|