From 731d7d72b4e941837964ae4d949becd7dfffd254 Mon Sep 17 00:00:00 2001 From: Mayur Das Date: Sat, 17 Oct 2026 10:20:38 +0530 Subject: [PATCH] docs: Docker starts at boot on the Docker template The template now starts its daemon when the sandbox boots, so the docs and the Docker example no longer run start-docker first; it is only mentioned for a daemon that has stopped. Signed-off-by: Mayur Das --- README.md | 2 +- docs/api-reference.md | 2 +- docs/getting-started.md | 2 +- examples/docker.py | 14 ++++---------- 4 files changed, 7 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 87aa302..5eceee3 100644 --- a/README.md +++ b/README.md @@ -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`) | diff --git a/docs/api-reference.md b/docs/api-reference.md index 039a9f9..625fbb7 100644 --- a/docs/api-reference.md +++ b/docs/api-reference.md @@ -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`) | diff --git a/docs/getting-started.md b/docs/getting-started.md index acf5578..c02c2e5 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -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`) | diff --git a/examples/docker.py b/examples/docker.py index bb305a4..3353c0a 100644 --- a/examples/docker.py +++ b/examples/docker.py @@ -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``); @@ -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: