2026-05-13 12:13:20 -04:00
|
|
|
# Dev Sandbox
|
|
|
|
|
|
|
|
|
|
This is a Dockerfile definition for a container that I use to sandbox my Pi coding agent.
|
2026-05-13 21:00:54 -04:00
|
|
|
This also contains my Pi coding agent configuration.
|
|
|
|
|
|
|
|
|
|
## Setup
|
|
|
|
|
|
|
|
|
|
Set up Docker container
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
docker build -t dev_sandbox .
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Function I use to execute the sandbox:
|
|
|
|
|
```zsh
|
|
|
|
|
sandbox() {
|
|
|
|
|
if ! docker ps -a --format '{{.Names}}' | grep -q '^dev-sandbox$'; then
|
|
|
|
|
docker run -dit --name dev-sandbox \
|
|
|
|
|
--env-file ~/rescale/dev_sandbox/.env \
|
|
|
|
|
-v ~/repos:/workspace \
|
|
|
|
|
-v pi-state:/root/.pi \
|
|
|
|
|
-v /var/run/docker.sock:/var/run/docker.sock \
|
|
|
|
|
dev-sandbox:latest
|
|
|
|
|
else
|
|
|
|
|
docker start dev-sandbox 2>/dev/null
|
|
|
|
|
fi
|
|
|
|
|
docker exec -it dev-sandbox /bin/zsh
|
|
|
|
|
}
|
|
|
|
|
```
|