mirror of
https://github.com/coder/coder.git
synced 2026-11-09 04:54:20 +08:00
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.
21 lines
767 B
Docker
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
|