# Demo AGENT container (not the hub): one interactive bash session in tmux,
# served by ttyd through agent-terminal.sh (FR-08, FR-09), plus the
# agent-status helper that reports to the hub (FR-01). Build context is the
# repo root: podman build -f examples/demo-agent/Containerfile .
FROM registry.fedoraproject.org/fedora:45

# tmux and ttyd come from Fedora's signed package repositories (Debian ships
# ttyd only in testing/unstable, not in a stable release); curl is in the base
RUN dnf install -y tmux ttyd \
    && dnf clean all

COPY --chmod=755 agent-terminal.sh /usr/local/bin/agent-terminal.sh
COPY --chmod=755 examples/demo-agent/agent-status /usr/local/bin/agent-status
COPY --chmod=755 examples/demo-agent/demo-agent-entrypoint.sh /usr/local/bin/demo-agent-entrypoint.sh

RUN useradd --create-home --uid 10001 agent
USER agent
WORKDIR /home/agent

EXPOSE 7681
ENTRYPOINT ["/usr/local/bin/demo-agent-entrypoint.sh"]
