|
| 1 | +# Daytona runtime image |
| 2 | + |
| 3 | +This repository defines the credential-free runtime image used by Mogil Bench's |
| 4 | +**Harbor 0.18.0** Daytona adapter. The intended registry repository is |
| 5 | +`ghcr.io/mogilventures/mogil-bench-daytona-runtime`. |
| 6 | + |
| 7 | +The image contract is intentionally narrow: |
| 8 | + |
| 9 | +- Python 3.12.11 is available as `/usr/local/bin/python`; |
| 10 | +- `/bin/sh`, Node 22.19.0, and npm 10.9.3 are available; |
| 11 | +- `pi --version` returns exactly `0.80.6` (optionally followed by one newline); |
| 12 | +- Pi is installed with Mogil's reviewed npm alias, |
| 13 | + `@mariozechner/pi-coding-agent@npm:@earendil-works/pi-coding-agent@0.80.6`; |
| 14 | +- both upstream image indexes, the Dockerfile frontend, and all named versions |
| 15 | + are pinned; |
| 16 | +- npm's full production graph is integrity-pinned by `package-lock.json`; and |
| 17 | +- the closed build context contains only the Docker definition and npm manifests; |
| 18 | + only the non-secret manifests are copied into the image. |
| 19 | + |
| 20 | +No credentials are needed to build or inspect it. Never pass build secrets, |
| 21 | +registry credentials, auth files, benchmark fixtures, or repository source as |
| 22 | +build arguments or context content. |
| 23 | + |
| 24 | +## Local build and inspection |
| 25 | + |
| 26 | +From the repository root, with Docker available: |
| 27 | + |
| 28 | +```sh |
| 29 | +scripts/build-daytona-runtime.sh mogil-bench-daytona-runtime:local |
| 30 | +scripts/inspect-daytona-runtime.sh mogil-bench-daytona-runtime:local |
| 31 | +pytest -q tests/test_daytona_runtime_image.py |
| 32 | +``` |
| 33 | + |
| 34 | +The build script does not log in, push, or otherwise publish. It first fails if |
| 35 | +anything has been added to the minimal build context. The inspection script runs |
| 36 | +the literal Pi version command, validates its exact bytes, checks the Python path |
| 37 | +and minor version, exercises Node/npm and the shell, and scans image configuration |
| 38 | +and layer commands for credential-like material. |
| 39 | + |
| 40 | +## Reviewed publish workflow |
| 41 | + |
| 42 | +Publishing is a deliberate operator action, not CI behavior. Start from a clean, |
| 43 | +reviewed commit and choose a unique release tag (for example a date plus short |
| 44 | +source revision). Authenticate Docker to GHCR outside the build; do not put the |
| 45 | +token in an environment variable consumed by Dockerfile instructions or in the |
| 46 | +build context. |
| 47 | + |
| 48 | +Build and load each target platform locally first, then run the inspection script |
| 49 | +against it. After review, publish a multi-platform manifest directly with Buildx: |
| 50 | + |
| 51 | +```sh |
| 52 | +REPOSITORY=ghcr.io/mogilventures/mogil-bench-daytona-runtime |
| 53 | +RELEASE=2026-07-12-abcdef0 |
| 54 | + |
| 55 | +docker buildx build \ |
| 56 | + --platform linux/amd64,linux/arm64 \ |
| 57 | + --file runtime/daytona/Dockerfile \ |
| 58 | + --tag "${REPOSITORY}:${RELEASE}" \ |
| 59 | + --provenance=true --sbom=true --push \ |
| 60 | + runtime/daytona |
| 61 | + |
| 62 | +docker buildx imagetools inspect "${REPOSITORY}:${RELEASE}" |
| 63 | +``` |
| 64 | + |
| 65 | +Copy the resulting manifest digest from the inspection output and form the only |
| 66 | +supported runtime reference: |
| 67 | + |
| 68 | +```text |
| 69 | +ghcr.io/mogilventures/mogil-bench-daytona-runtime@sha256:<64-hex-manifest-digest> |
| 70 | +``` |
| 71 | + |
| 72 | +Run `scripts/inspect-daytona-runtime.sh` against that digest (Docker will inspect |
| 73 | +the current platform), then use the same immutable reference as |
| 74 | +`TERMINAL_DAYTONA_IMAGE` or the pack's `environment_policy.image`. Tags are only |
| 75 | +publication handles; never put a tag-only reference in a benchmark pack. Record |
| 76 | +the digest in the release/operations record. Do not retag a mutable channel or |
| 77 | +configure Daytona from one. |
| 78 | + |
| 79 | +The image contains runtime prerequisites only. Model credentials remain Daytona |
| 80 | +organization-secret references attached by the adapter to the agent sandbox; |
| 81 | +they are neither build inputs nor image content. The same image can therefore be |
| 82 | +used for Harbor's separately created no-network verifier sandbox without exposing |
| 83 | +agent credentials. |
0 commit comments