This repository provides a template of a development sandbox for coding agents.
It has the following features:
- Relies on
gVisorfor providing a safe sandbox. - Provides a redundant rootfs with passwordless sudo.
- Exposes users home directory.
These are only the absolutely minimal restrictions that one should place while using coding agents. Further restrictions can be obviously applied, when seen feasible.
sudo runsc install has SUID and host Unix-domain socket access disabled by
default.
SUID can be enabled by editing /etc/docker/daemon.json and adding
runtimeArgs field:
{
"runtimes": {
"runsc": {
"path": "/usr/bin/runsc",
"runtimeArgs": ["--allow-suid", "--host-uds=open"]
}
}
}Initialize .env and start the container:
make init NAME=docker-agent
docker compose up --buildOverride can be done with, for example, make init NAME=docker-agent RUN=runc.
A development shell can be opened inside the container as follows:
docker exec -it docker-agent zsh -l
docker-agent is licensed under MIT. See LICENSE for more information.