Skip to content

Commit 3972bef

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 (#2942). Docker and Podman run images without USER as UID/GID 1000 (#3386), the driver creates /sandbox, and the CLI no longer builds Dockerfiles (#3214). Update the bring-your-own-container example and the runtimes page to match. Fixes #3965 Signed-off-by: Adel Zaalouk <azaalouk@redhat.com>
1 parent 5acaaba commit 3972bef

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
@@ -82,7 +82,7 @@ To pin specific GPUs, pass `cdi_devices` for Docker or Podman, or `gpu_device_id
8282

8383
## Docker Driver
8484

85-
[Docker](https://www.docker.com/get-started/) runs sandboxes as containers on the gateway host. Docker is also required to build sandbox images from local directories or Dockerfiles.
85+
[Docker](https://www.docker.com/get-started/) runs sandboxes as containers on the gateway host.
8686

8787
```toml
8888
[openshell.gateway]
@@ -288,7 +288,7 @@ Set `process.run_as_user` and `process.run_as_group` in the sandbox policy to ch
288288

289289
| Driver | Default identity |
290290
|---|---|
291-
| Docker, Podman | The image's `USER`. Images without `USER` must set both fields in policy. |
291+
| Docker, Podman | The image's `USER`, otherwise `1000`. |
292292
| Kubernetes | OpenShift SCC namespace annotations, otherwise `1000`. Override with `sandbox_uid` and `sandbox_gid`. |
293293
| MicroVM | The image's `sandbox` account, otherwise `1000`. Override with `sandbox_uid` and `sandbox_gid`. |
294294

‎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, an image `WORKDIR`
79+
other than `/` or `/sandbox` becomes the workspace instead, and it must exist
80+
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)