Skip to content

Commit 5a44469

Browse files
committed
docs(sandbox): align workload image requirements with current runtime
Workload images no longer need iproute2 or nftables since the supervisor moved out of the workload (NVIDIA#2942). Docker and Podman run images without USER as UID/GID 1000 (NVIDIA#3386), the driver creates /sandbox, and the CLI no longer builds Dockerfiles (NVIDIA#3214). Update the bring-your-own-container example and the runtimes page to match. Fixes NVIDIA#3965 Signed-off-by: Adel Zaalouk <[email protected]>
1 parent e7dc051 commit 5a44469

3 files changed

Lines changed: 10 additions & 11 deletions

File tree

‎docs/how-it-works/sandboxes/runtimes.mdx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ To pin specific GPUs, pass `cdi_devices` for Docker or Podman, or `gpu_device_id
107107

108108
## Docker Driver
109109

110-
[Docker](https://www.docker.com/get-started/) runs sandboxes as containers on the Docker daemon host. The gateway accesses the daemon through its configured Unix socket. Docker is also required to build sandbox images from local directories or Dockerfiles.
110+
[Docker](https://www.docker.com/get-started/) runs sandboxes as containers on the Docker daemon host. The gateway accesses the daemon through its configured Unix socket.
111111

112112
```toml
113113
[openshell.gateway]
@@ -362,7 +362,7 @@ On Docker and Podman, set `process.run_as_user` and `process.run_as_group` in th
362362

363363
| Driver | Default identity |
364364
|---|---|
365-
| Docker, Podman | The image's `USER`. Images without `USER` must set both fields in policy. |
365+
| Docker, Podman | The image's `USER`, otherwise `1000`. |
366366
| Kubernetes | OpenShift SCC namespace annotations, otherwise `1000`. Override with `sandbox_uid` and `sandbox_gid`. |
367367
| MicroVM | The image's `sandbox` account, otherwise `1000`. Override with `sandbox_uid` and `sandbox_gid`. |
368368

‎examples/bring-your-own-container/Dockerfile‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,9 @@
77

88
FROM python:3.13-slim
99

10-
# System tools useful for sandbox networking and debugging.
11-
# iproute2: required for network namespace management (ip netns, veth pairs)
12-
# nftables: optional, enables bypass detection (log + reject for direct connections)
10+
# curl is only for debugging. OpenShell needs no networking tools in the image.
1311
RUN apt-get update && apt-get install -y --no-install-recommends \
14-
curl iproute2 nftables \
12+
curl \
1513
&& rm -rf /var/lib/apt/lists/*
1614

1715
RUN groupadd --gid 1500 app \

‎examples/bring-your-own-container/README.md‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,13 @@ key requirements are:
7171
at runtime.
7272
- **Declare a non-root OCI `USER`** for Docker and Podman. Use a named account
7373
such as `app`, a numeric UID with a passwd entry that supplies its primary
74-
GID, or a numeric pair such as `1500:1500`. You can instead set both
74+
GID, or a numeric pair such as `1500:1500`. You can instead set
7575
`process.run_as_user` and `process.run_as_group` explicitly in policy.
76-
- **Prepare `/sandbox` as the workspace.** Until OCI working-directory support
77-
is added, create `/sandbox` and make it writable by the selected identity.
78-
The example does this with `install -d -o app -g app /sandbox`.
79-
- **Install `iproute2`** for full network namespace isolation.
76+
Images without `USER` run as UID and GID `1000`.
77+
- **Use `/sandbox` or an existing `WORKDIR` as the workspace.** The driver
78+
creates `/sandbox` for the selected identity. On Docker and Podman, an image
79+
`WORKDIR` other than `/` or `/sandbox` becomes the workspace instead, and it
80+
must exist and be writable by the selected identity.
8081
- **Use a standard Linux base image** — distroless and `FROM scratch`
8182
images are not supported.
8283

0 commit comments

Comments
 (0)