Run agentbloat with Docker Compose
The agentbloat service opens a Zsh login shell in agentbloat with
the directory in WORKSPACE mounted at /workspace. compose.sh
checks that WORKSPACE is an absolute path, because Compose would resolve a relative
one against this directory, then runs docker compose here.
- Images
- GHCR
ghcr.io/hambn/agentbloat - Docker Hub
docker.io/hambn/agentbloat
- GHCR
- Use case
- Repeatable local multi-agent workspace
On this page
Prerequisites
- Docker Engine with the Compose v2 plugin.
Open a shell
WORKSPACE="$PWD" ./compose.sh run --rm agentbloatThe shell starts in /home/sysadmin; run cd /workspace, then any agent. Sign in from
the agent's prompt, or forward an API key with -e, for example
./compose.sh run --rm -e OPENAI_API_KEY agentbloat. Logins are removed with the
container.
Run without registry access
On a connected machine, run docker save ghcr.io/hambn/agentbloat:ubuntu-browser -o agentbloat.tar.
On the offline host, load it and use the air-gapped file, which sets
pull_policy: never:
docker load -i agentbloat.tar
WORKSPACE="$PWD" ./compose.sh -f airgapped.docker-compose.yml run --rm agentbloatVariables
| Variable | Required | Purpose |
|---|---|---|
WORKSPACE |
yes | Absolute host path mounted at /workspace. |
AGENTBLOAT_IMAGE |
no | Image for both Compose files. Defaults to ghcr.io/hambn/agentbloat:ubuntu-browser; set a digest reference to pin one build. |
Workspace
WORKSPACE is mounted at /workspace. The agents run as UID 1000, so new files belong
to UID 1000 on the host.
Files
compose.shvalidatesWORKSPACEand passes its arguments todocker compose.docker-compose.ymlruns the published image.airgapped.docker-compose.ymlruns a loaded image and never pulls.
File contents
airgapped.docker-compose.yml12 lines
# Offline: docker load -i agentbloat.tar first, then
# WORKSPACE="$PWD" ./compose.sh -f airgapped.docker-compose.yml run --rm agentbloat
name: agentbloat
services:
agentbloat:
image: ${AGENTBLOAT_IMAGE:-ghcr.io/hambn/agentbloat:ubuntu-browser}
pull_policy: never
volumes:
- ${WORKSPACE:?Set WORKSPACE to an absolute host path}:/workspace
stdin_open: true
tty: truecompose.sh18 lines
#!/usr/bin/env bash
# Compose resolves relative paths against this directory, so require an absolute WORKSPACE.
set -euo pipefail
case "${WORKSPACE:-}" in
/*) ;;
"")
echo "Set WORKSPACE to an absolute host path." >&2
exit 2
;;
*)
echo "WORKSPACE must be an absolute host path: $WORKSPACE" >&2
exit 2
;;
esac
cd -- "$(dirname -- "${BASH_SOURCE[0]}")"
exec docker compose "$@"docker-compose.yml10 lines
# WORKSPACE="$PWD" ./compose.sh run --rm agentbloat
name: agentbloat
services:
agentbloat:
image: ${AGENTBLOAT_IMAGE:-ghcr.io/hambn/agentbloat:ubuntu-browser}
volumes:
- ${WORKSPACE:?Set WORKSPACE to an absolute host path}:/workspace
stdin_open: true
tty: true