Run the lab in a Docker Sandbox
You can run this lab with sbx instead of Docker Compose. Everything (instructions, VS Code, and a private Docker engine for the lab) runs in a single microVM, and sbx rm removes everything the lab created.
Note: No AI agent is involved, even though this runs in Docker Sandboxes: the lab uses the plain
shellsandbox, and you type every command yourself.
The kits
This option uses Sandbox Kits, layered onto the shell sandbox:
- the Labspace kit from mathieu-benoit/labsbxes, which runs the interface and the IDE;
- the Docker Scout kit
docker.io/sbx/scout-cli, which installs thedocker scoutCLI plugin and signs it in to Docker Scout with your host'ssbx login; - the content kit of this repository (in sbx-kit/), which carries
labspace/andproject/, the app port (5001) and the network access the lab needs (Docker login,dhi.io, PyPI). It requires the other two kits:sbxrefuses to start it without them.
They are also published together as one reference: the kit set labsbx-dhi-launch.yaml merges the three with the shell sandbox into a single workload kit, ghcr.io/mathieu-benoit/labsbx-dhi-launch (see Kit sets).
Before you start
By default sbx only installs kits from docker.io/ and dhi.io/, so first allow the GHCR namespace:
sbx settings set kit.allowedSources '["docker.io/","dhi.io/","ghcr.io/mathieu-benoit/"]'
Run the lab
From an empty folder (sbx run mounts the current folder as the workspace), run the kit set:
sbx run ghcr.io/mathieu-benoit/labsbx-dhi-launch:latest -p 8085:8085 -p 5001:5001 --name dhi-launch -d
This is the same as passing the three kits yourself onto shell:
sbx run shell --kit ghcr.io/mathieu-benoit/labsbxes/labspace:latest --kit docker.io/sbx/scout-cli:latest --kit ghcr.io/mathieu-benoit/labsbx-dhi-launch-mixin:latest -p 8085:8085 -p 5001:5001 --name dhi-launch -d
The set pins the exact version of each kit it was built with, including shell, so it changes only when it is republished; passing the three :latest kits onto shell picks up each one's newest version. Use that form too to add the lab to another agent with a Docker engine (for example sbx run claude --kit ...): the set already carries a workload, so it can't be layered onto another one.
Then open the interface on the host port that sbx ports dhi-launch lists for sandbox port 3030 (add -p 3030:3030 to the command to always use http://localhost:3030).
-p 8085:8085is required: the interface embeds the IDE athttp://localhost:8085.-p 5001:5001is for the lab's "App" tab (http://localhost:5001).- The lab's "Docker login" section isn't needed: the sandbox uses your host's
sbx loginfor Docker Scout and for pulls from Docker Hub anddhi.io. For another private registry, store its credentials on your host withsbx secret set --registry(see Registry credentials). - Stop the lab with
sbx stop dhi-launch, restart it withsbx run --name dhi-launch -d, delete it withsbx rm dhi-launch.
Tear down the lab
When you are done, delete the sandbox:
sbx rm dhi-launch
This removes everything the lab created: the containers, images, volumes and networks of the sandbox's private Docker engine, and your changes to the lab's project.