Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ Templates you can start from:
| Template | Use it for |
| --- | --- |
| `sb-ubuntu-26-04-dev` | General development: git, gh, Python 3, Node 24 LTS |
| `sb-ubuntu-26-04-docker` | Docker, Compose and Buildx; run `start-docker` first, and run containers with `--network=host` |
| `sb-ubuntu-26-04-docker` | Docker, Compose and Buildx, with Docker started at boot; run containers with `--network=host` |
| `sb-ubuntu-26-04-interpreter` | The [code interpreter](#code-interpreter): Python kernels that keep their state |
| `sb-ubuntu-26-04-playwright` | Browser testing: a desktop with Node 24, Playwright and Chromium, headless or headed (`DISPLAY=:1`) |

Expand Down
2 changes: 1 addition & 1 deletion docs/api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Templates you can start from:
| Template | Use it for |
| --- | --- |
| `sb-ubuntu-26-04-dev` | General development: git, gh, Python 3, Node 24 LTS |
| `sb-ubuntu-26-04-docker` | Docker, Compose and Buildx; run `start-docker` first, and run containers with `--network=host` |
| `sb-ubuntu-26-04-docker` | Docker, Compose and Buildx, with Docker started at boot; run containers with `--network=host` |
| `sb-ubuntu-26-04-interpreter` | The [code interpreter](#code-interpreter): Python kernels that keep their state |
| `sb-ubuntu-26-04-playwright` | Browser testing: a desktop with Node 24, Playwright and Chromium, headless or headed (`DISPLAY=:1`) |

Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ the others add something specific.
| Template | Use it for |
| --- | --- |
| `sb-ubuntu-26-04-dev` | General development: git, gh, Python 3, Node 24 LTS |
| `sb-ubuntu-26-04-docker` | Docker, Compose and Buildx; run `start-docker` first, and run containers with `--network=host` |
| `sb-ubuntu-26-04-docker` | Docker, Compose and Buildx, with Docker started at boot; run containers with `--network=host` |
| `sb-ubuntu-26-04-interpreter` | The code interpreter: Python kernels that keep their state (`sandbox.code`) |
| `sb-ubuntu-26-04-playwright` | Browser testing: a desktop with Node 24, Playwright and Chromium, headless or headed (`DISPLAY=:1`) |

Expand Down
14 changes: 4 additions & 10 deletions examples/docker.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"""
Run Docker inside a sandbox: start the daemon, then run a container.
Run Docker inside a sandbox and run a container.

The ``sb-ubuntu-26-04-docker`` template ships Docker and Docker Compose. Start the
daemon with ``start-docker`` (safe to rerun), then use ``docker`` as usual, with
two differences:
The ``sb-ubuntu-26-04-docker`` template ships Docker and Docker Compose and starts
the daemon at boot, so use ``docker`` as usual (run ``start-docker`` if the daemon
ever stops), with two differences:

- run and build with ``--network=host`` (Compose: ``network_mode: host`` and
``build.network: host``);
Expand Down Expand Up @@ -35,12 +35,6 @@ def main() -> None:
sandbox.wait_until_ready()
print(f"ready: {sandbox.id}", file=sys.stderr)

started = sandbox.exec("start-docker")
print(started.stdout.strip())
if started.exit_code != 0:
print(started.stderr, file=sys.stderr)
sys.exit(1)

run = sandbox.exec(["docker", "run", "--rm", "--network=host", "hello-world"])
print(run.stdout.strip())
if run.exit_code != 0:
Expand Down
Loading