Files
coder/examples/templates/x/docker-chat-sandbox/Dockerfile.chat
T
Michael Suchacz cf500b95b9 chore: move docker-chat-sandbox under templates/x (#23777)
Adds the experimental `docker-chat-sandbox` example template under
`examples/templates/x/`. It provisions a regular dev agent plus a
chat-designated agent that runs inside bubblewrap with a read-only root,
writable `/home/coder`, and outbound TCP restricted to the Coder
control-plane endpoint via `iptables`.

The chat agent still appears in dashboard and API responses, but the
template reserves it for chatd-managed sessions rather than normal user
interaction. `lint/examples` now walks nested template directories, so
experimental templates can live under `examples/templates/x/` without
treating `x/` itself as a template.
2026-03-30 15:17:55 +02:00

21 lines
767 B
Docker

FROM codercom/enterprise-base:ubuntu
USER root
# Install bubblewrap and iptables for sandboxed agent execution.
RUN apt-get update && \
apt-get install -y --no-install-recommends bubblewrap iptables && \
rm -rf /var/lib/apt/lists/*
# Wrapper script that starts the agent inside a bwrap sandbox.
# Everything the agent spawns (tool calls, SSH, etc.) inherits
# the restricted namespace.
COPY bwrap-agent.sh /usr/local/bin/bwrap-agent
RUN chmod 755 /usr/local/bin/bwrap-agent
# Run as root so bwrap can create mount namespaces without needing
# user namespace support (which Docker blocks). The bwrap sandbox
# itself provides filesystem isolation (read-only root).
# The coder user home is still /home/coder (writable via bind mount).
ENV HOME=/home/coder