Container images
Each release builds eleven images for linux/amd64 and linux/arm64 and pushes them to registry.spanway.ai. The Python images carry Spanway's own code only as compiled native modules, with no Python source, bytecode or stub file of ours inside, on a root filesystem that has no shell and no package manager. Every image is tagged with the release version both with and without a v prefix (v2.0.0 and 2.0.0), with sha-<commit>, and on tagged releases also with main-stable and latest. The same pipeline pushes three Helm charts to oci://registry.spanway.ai/spanway/charts (listed under Helm charts) and attaches the spanway-client Python client and the @spanway/client TypeScript client to the release page. The gateway, enterprise and extras code is never published as a package. It ships only inside the images, and the release refuses to attach a gateway, enterprise, extras, admin agent or Lens worker package to the release page.
Before an image is tagged or signed, the release scans each architecture's image for known vulnerabilities and stops when it finds a high or critical vulnerability that has a fixed version, apart from reviewed exceptions, which the VEX document published with each release lists with their reason and deadline. The release also checks each architecture's filesystem and stops if any first-party Python source, bytecode or stub file is found in it. The same vulnerability scan and source check also run every day against the current images.
A real-world scenario
A bank's platform team may only run images that are signed by the vendor and come with an SBOM their scanner can read. Before they promote a new release to production, they pull the image by digest, verify its signature and its SBOM attestation with the release key, and only then update the chart's image tag.
Steps
-
Download
spanway-release-signing.pubfrom the release page and compare it with the copy you pinned on the first release. -
Verify the image and its SBOM as shown in Verifying signatures and SBOMs.
-
Run the image and check that it answers.
docker run --rm -p 4000:4000 -e SPANWAY_MASTER_KEY="$SPANWAY_MASTER_KEY" registry.spanway.ai/spanway/spanway-ai:v2.0.0curl http://localhost:4000/health/liveliness -
Read the version the running gateway reports. This works without a database.
curl -s http://localhost:4000/health/readiness/details \-H "Authorization: Bearer $SPANWAY_MASTER_KEY" | jq -r .spanway_versionThe Admin UI needs a database to sign in, so to check it there too, start the quickstart compose stack with the same image, open
http://localhost:4000/uiand sign in asadminwith the master key. The version badge next to the Spanway logo at the top left shows the release you verified.
Expected result
cosign verify exits 0 and prints the verified signature, the SBOM file holds the SPDX document, and the running gateway reports the same version.
The images
| Image | What it runs | Port | Used by |
|---|---|---|---|
spanway-ai | The full proxy, running as uid 65534. The entrypoint is spanway-container proxy, which runs the spanway command with whatever arguments follow the image name, wraps it in ddtrace-run when USE_DDTRACE=true, and switches to the bundled Admin Assistant when the first argument is --admin-agent | 4000 | The quickstart compose file, the all-in-one Helm chart, the admin-assistant worker |
spanway-ai-database | The same image as spanway-ai under a second name | 4000 | Deployments that reference this name |
spanway-ai-non-root | The same image as spanway-ai under a second name | 4000 | Read-only root filesystem deployments |
spanway-ai-fips | The full proxy built for FIPS 140-3: the validated OpenSSL FIPS provider, SPANWAY_FIPS_MODE=true and an OpenSSL configuration that refuses non-approved algorithms. spanway-container fips-check proves it. See FIPS 140-3 image | 4000 | Deployments that must use FIPS validated cryptography |
spanway-gateway | The LLM data plane only, started as spanway-container gateway, which reads NUM_WORKERS, as uid 65534 | 4000 | Componentised chart gateway, Terraform stacks |
spanway-backend | The management API and Admin UI backend, started as spanway-container backend, as uid 65534 | 4001 | Componentised chart backend, Terraform stacks |
spanway-ui | The Admin UI as a static export served by nginx | 3000 | Componentised chart ui, Terraform stacks |
spanway-migrations | spanway-container migrations-job, which assembles DATABASE_URL from the DATABASE_* variables or an IAM token, runs prisma migrate deploy with retry and baseline recovery, then builds the request-log indexes | none | Componentised chart migrationJob, the migration task in every Terraform stack |
lens | The Lens agent tracing worker | 4318 | lensWorker.mode: bundled in both charts |
spanway-admin-agent | The standalone Admin Assistant for Slack, spanway-container admin-agent, with the admin MCP connector installed beside it, as uid 65534 | 10000 | Running the agent outside the gateway image, for example with the agent's own compose file |
spanway-ai-dev | The full proxy plus a built-in PostgreSQL 18, started as spanway-container dev, which starts the database on 127.0.0.1 inside the container, points the proxy at it and stops both together. Data lives in /var/lib/spanway/dev. For a laptop only, never for production | 4000 | Dev mode |
Every Python image comes from the same build. One build stage compiles the gateway, the enterprise and extras packages, the component entrypoints and the Admin Assistant into native extension modules and deletes their sources, and a second stage installs the runtime packages (Python, Node for the Prisma CLI, the time zone database, the certificate bundle and a few libraries) from the pinned Wolfi repository into an empty root filesystem, so the final images have no shell, no package manager and nothing to read the code from. Data files such as pricing tables, the Prisma schema, migration SQL, the Admin UI export and the third-party licence notices stay in place. All of them compile PgBouncer into the image, which is what db.connectionPool.enabled in the charts and gateway_connection_pool_enabled in the Terraform stacks turn on. The Prisma CLI and engines are baked in at build time and pinned through PRISMA_BINARY_CACHE_DIR and PRISMA_CLI_PATH, so a migration on a fresh database needs no network access.
The images start every process through spanway-container <role>, which is also what the charts and the Terraform stacks call for the migration job, the metrics sidecar, the spend collector and the workflow worker. The roles are proxy, gateway, backend, worker, migrate, migrations-job, collector, metrics-server, admin-agent, assistant-index, the one-off job that builds the public assistant index, dev, which only works in the spanway-ai-dev image, and fips-check, the FIPS self-check. Before starting the role it writes REDIS_CA_PEM_B64 to REDIS_SSL_CA_CERTS when both are set, downloads the object named by SPANWAY_PROXY_CONFIG_S3_BUCKET and SPANWAY_PROXY_CONFIG_S3_KEY to CONFIG_FILE_PATH when all three are set, clears a stale PROMETHEUS_MULTIPROC_DIR for the gateway, backend and worker roles, and re-runs itself under ddtrace-run when USE_DDTRACE=true.
Helm charts
| Chart | What it deploys |
|---|---|
oci://registry.spanway.ai/spanway/charts/spanway | The componentised install, with the gateway, the management backend, the Admin UI and the migration job as separate workloads, plus the Lens chart as a dependency. |
oci://registry.spanway.ai/spanway/charts/spanway-helm | The all-in-one install that runs the spanway-ai image. |
oci://registry.spanway.ai/spanway/charts/lens | The Lens tracing worker on its own. |
The spanway and spanway-helm charts carry the release tag as their appVersion, so they pull the gateway images built by the same release unless you override the image tag. The Lens chart carries the release version as both its version and its appVersion, so the spanway and spanway-helm charts of a release pull the lens image of that same release. Each release pushes the lens image under its own version tag, so a tag never moves to a newer build.
Verifying signatures and SBOMs
Every image and every chart is signed with Sigstore cosign from the release workflow, and carries an SPDX SBOM as a signed attestation. Images are signed recursively, so the multi-platform index and each platform manifest carry a signature. The release cycle page describes how the signing key is held. Install cosign 2.4 or later.
Releases are signed with a key held in a cloud key management service, and no record is written to the public Sigstore transparency log. Every private release attaches its public key to the release page as spanway-release-signing.pub, and the same key signs every private 2.x release, so pin the copy you first downloaded and compare it with the attached file on each release. That key stays published after launch, so the private releases keep verifying with it. Releases from launch on are signed keylessly and recorded in the public transparency log, and they verify against the release workflow identity instead of a key, as shown at the end of this section. Verification is offline and passes --insecure-ignore-tlog=true, which only tells cosign not to look for a transparency log entry that was never written. The registry address and pull credentials are in your Spanway onboarding pack.
Verify an image signature. Pin the image by digest in production and verify that digest, since a tag can be moved:
cosign verify registry.spanway.ai/spanway/spanway-ai:v2.0.0 \
--key spanway-release-signing.pub \
--insecure-ignore-tlog=true
Verify the SBOM attestation and extract the SPDX document:
cosign verify-attestation registry.spanway.ai/spanway/spanway-ai:v2.0.0 \
--type spdxjson \
--key spanway-release-signing.pub \
--insecure-ignore-tlog=true \
| jq -r '.payload' | base64 -d | jq '.predicate' > spanway-ai.spdx.json
The commands work for every image in the table above and for the charts, using the chart's OCI reference without the oci:// prefix, for example registry.spanway.ai/spanway/charts/spanway:<version>, where <version> is the release version without the v, such as 2.0.0. cosign verify exits non-zero when no signature matches the key, so it can gate a deployment pipeline or an admission controller such as the Sigstore policy controller. Images also carry the BuildKit provenance attestation that docker buildx imagetools inspect <image> --format '{{ json .Provenance }}' prints.
A release signed from launch on has no key file. Verify it against the release workflow identity that the release notes of the launch version give, which cosign checks in the public transparency log:
IDENTITY='<release workflow identity from the launch release notes>'
ISSUER=https://token.actions.githubusercontent.com
cosign verify --certificate-identity-regexp "$IDENTITY" --certificate-oidc-issuer "$ISSUER" registry.spanway.ai/spanway/spanway-ai:<version>
cosign verify-attestation --type spdxjson \
--certificate-identity-regexp "$IDENTITY" --certificate-oidc-issuer "$ISSUER" registry.spanway.ai/spanway/spanway-ai:<version>
Release assets, SBOMs and VEX
Every release also attaches its files to the release page, next to a signature for each one. The download location is in your onboarding pack.
| Artifact | SBOM | Signature |
|---|---|---|
| Container images | SPDX attestation on the image, generated from its linux/amd64 variant, plus image-<name>.spdx.json | cosign on the image and each platform manifest |
| Helm charts | SPDX attestation on the chart, plus chart-<chart>.tgz.spdx.json | cosign on the chart |
spanway-client Python client, two files | <file>.spdx.json | <file>.cosign.bundle |
@spanway/client npm package | <tarball>.spdx.json | <tarball>.cosign.bundle |
| VS Code extension | spanway-vscode.vsix.spdx.json | spanway-vscode.vsix.cosign.bundle |
| Postman collection and environment | not applicable, they are JSON request definitions | spanway.postman_collection.json.cosign.bundle and spanway.postman_environment.json.cosign.bundle |
| Terraform provider | <archive>.zip.spdx.json on the provider's own release, listing the Go modules in the binary | GPG signature on the provider's SHA256SUMS, which covers the archives and their SBOMs |
| VEX document | not applicable | spanway-<version>.openvex.json.cosign.bundle |
The SBOM for the Python client lists the client and every package that installing it pulls in on Python 3.12, resolved against the client's release lockfile, and both of its files get the same contents. The npm package and the VS Code extension SBOMs list their production dependencies from their lockfiles. SHA256SUMS lists a checksum for every asset and is signed the same way. The release is only created after every publishing, SBOM and VEX job succeeded, and it fails if any client file, npm tarball or extension file lacks a populated SPDX SBOM, or if a server package reached the release page. A store or registry whose publishing token or signing key is not configured is skipped with a warning and still counts as a success, which is the case today for the VS Code extension stores, so the extension files are only on the release page. During the private preview the Terraform provider is not built by the release at all and no release page carries it. Ask support@spanway.ai for the provider build, as Terraform provider explains.
The container image SBOMs come from scanning the image, which sees Python packages but not the Rust crates inside the native extension. Those crates are covered by the VEX document, which scans the release's Cargo.lock for every image that carries the extension.
Verify any file against its bundle with the same key as the images. spanway-release-signing.pub and SHA256SUMS are signed like every other asset, so start with the key you pinned, then the checksum list:
cmp spanway-release-signing.pub <pinned-copy>
cosign verify-blob SHA256SUMS \
--bundle SHA256SUMS.cosign.bundle \
--key spanway-release-signing.pub \
--insecure-ignore-tlog=true
sha256sum --check SHA256SUMS
Then verify each file you install against its own bundle with the same key:
cosign verify-blob spanway_client-2.0.0.tar.gz \
--bundle spanway_client-2.0.0.tar.gz.cosign.bundle \
--key spanway-release-signing.pub \
--insecure-ignore-tlog=true
cosign verify-blob exits non-zero when the bundle was not made by the pinned key or the file changed after signing. A full check of a downloaded release is the three steps together. Run cosign verify-blob on SHA256SUMS and sha256sum --check SHA256SUMS so every file matches the signed list, then cosign verify-blob on each file you install, and cosign verify on each image you deploy. The release workflow runs the same cosign verify-blob check on every asset before it attaches anything to the release page.
After you install the npm package, npm audit signatures checks the registry signature on it. The package has no npm provenance attestation, so verify the tarball against its cosign bundle as shown above.
Every release comes from a signed release tag. Before an image is tagged or signed, the release exports its filesystem and stops if any Spanway source file remains. The Python client is never published to a package index. Public registry listings for the @spanway/client npm package, the Terraform provider and the VS Code extension are planned, as the release cycle page describes.
VEX and the fix SLA
Each release ships an OpenVEX document built from an osv-scanner scan of the lockfiles behind the released artifacts, run with no ignores applied. It has one statement per known vulnerability, naming the affected products and the vulnerable packages inside them. A finding whose fix we track is marked under_investigation, with the reason and the date until which we accept it. Every other finding is marked affected and carries the fix SLA for its severity. The document records our status, reason and fix deadline for each vulnerability, so you can compare it with your own scanner's findings. It contains no not_affected or fixed statements, so passing it to a scanner that uses VEX to filter results, such as grype --vex, does not hide any finding.
The fix SLA counts from the day a fixed upstream release is available, and the severity is the highest CVSS score osv-scanner reports for the vulnerability.
| Severity | CVSS score | Fixed release within |
|---|---|---|
| Critical | 9.0 and above | 7 days |
| High | 7.0 to 8.9 | 30 days |
| Medium | 4.0 to 6.9 | 90 days |
| Low | below 4.0 | 180 days |
| Unscored | none published | 30 days |
The scan covers uv.lock, the Admin UI, npm client and extension lockfiles, the Rust crates linked into the native extension, the Lens worker's Cargo.lock and its three npm lockfiles for the lens image, and the hash-pinned requirements.txt of the spanway-admin-agent image. Development dependencies in the lockfiles are included, so a statement can name a package that only the build uses.
Choosing between the proxy images
spanway-ai-dev is only for trying the gateway on one machine. It adds a built-in database to the proxy image and is described with its limits on the dev mode page. Every other deployment uses the images below with its own PostgreSQL.
spanway-ai is the default. Its entrypoint accepts the same arguments as the spanway command, so docker run registry.spanway.ai/spanway/spanway-ai:<tag> --config /app/config.yaml --num_workers 4 behaves like running the command locally. It runs as the unprivileged uid 65534 and carries no shell and no package manager, so docker exec needs an explicit program such as python, spanwayctl or prisma (for example docker exec -it <container> spanwayctl --help), and extra operating system packages go into a derived image that starts from a Wolfi base, copies this image's filesystem with COPY --from=registry.spanway.ai/spanway/spanway-ai:<tag> / /, installs what it needs and switches back to USER 65534. It is also the image that can run the Admin Assistant for Slack with --admin-agent, which is how the all-in-one chart's admin-assistant worker and docker-compose.admin-assistant.yml start it.
spanway-ai-non-root and spanway-ai-database are the same image as spanway-ai under two more names, so a deployment can pin whichever name its manifests use. For a read-only root filesystem the image needs writable scratch space for its cache and the migrations directory, so mount tmpfs volumes at /app/cache and /app/migrations and point XDG_CACHE_HOME at /app/cache and SPANWAY_MIGRATION_DIR at /app/migrations. Leave PRISMA_BINARY_CACHE_DIR at its image default /opt/prisma/binaries. The Prisma engines are baked in there and the image runs with PRISMA_OFFLINE_MODE=true, so pointing it at an empty volume leaves the migration with no engine and nothing to download one from. The engines are only read, so the read-only root filesystem does not affect them.
Environment variables the entrypoint reads
These variables change what spanway-container does before it starts a role. Leave them unset unless you need what the row describes. The environment variable reference lists the variables the gateway itself reads, such as the database and config bucket settings. The settings that change the gateway's behaviour, such as PROXY_BASE_URL, are described in configuration.
| Variable | Default | What it does | Who changes it |
|---|---|---|---|
USE_DDTRACE | unset (off) | true restarts the role under ddtrace-run, so Datadog APM traces every request. It also sets DD_TRACE_OPENAI_ENABLED=False, because the gateway traces provider calls itself and a second OpenAI integration would double them. Tracing adds a little CPU per request. | Operators who send traces to Datadog. |
SPANWAY_PROXY_CONFIG_S3_BUCKET, SPANWAY_PROXY_CONFIG_S3_KEY | unset | With both set and CONFIG_FILE_PATH set, the entrypoint downloads that S3 object to CONFIG_FILE_PATH before the gateway starts, so the config lives in S3 instead of a mounted file. The container needs read access to the object. | Operators who keep the config in S3, for example on ECS. |
REDIS_CA_PEM_B64 | unset | With REDIS_SSL_CA_CERTS set to a file path, the entrypoint writes this base64 encoded certificate there, so a Redis with a private certificate authority can be trusted without mounting a file. | Operators whose Redis uses a private CA. |
PROMETHEUS_MULTIPROC_DIR | unset | For the gateway, backend and worker roles, the entrypoint empties this folder at start, so metrics from a previous container are not added twice. | Set by the charts when metrics are on. |
USE_V2_MIGRATION_RESOLVER | true | Used by the migrations-job role. On, a migration that is already applied or partly applied is resolved without forcing the schema, which is safe during rolling deploys. false returns to the older resolver, which can rewrite the schema to match. Leave it on unless support asks otherwise. | Support, during a migration recovery. |
USE_PRISMA_DB_PUSH | false | Used by the migrations-job role. true makes the schema match the image with prisma db push instead of applying the migration history. It skips the migration records, so later upgrades can fail to apply. Only for throwaway test databases. | Nobody in production. |
Signing in to pull
Every command on this page pulls from registry.spanway.ai, Spanway's own registry. Enterprise customers sign in with the per-customer robot token from their onboarding pack. The token is read-only, so it pulls images and charts and pushes nothing, and it is tied to your account, so a pull is attributed to you.
docker login registry.spanway.ai --username <robot-name> --password <robot-token>
helm registry login registry.spanway.ai --username <robot-name> --password <robot-token>
Every image and chart pulls anonymously with no docker login. Enterprise features are switched on by the licence key, not by a different image, so the robot credentials only attribute pulls to your account. If an anonymous pull returns unauthorized or manifest unknown, the registry is misconfigured on our side, so write to support@spanway.ai with the full error.
Air-gapped and mirror installs substitute their own registry host for registry.spanway.ai in every command here, as Pulling from a private registry and the air-gapped page describe. That is the one place the registry address is meant to change.
Pulling from a private registry
Mirror the tags you need and point the deployment at the mirror. The charts take image.repository or <component>.image.repository plus imagePullSecrets, and the Terraform stacks take gateway_image, backend_image, ui_image and migrations_image (or image_registry and image_tag on GCP and Azure). Cloud Run only pulls from Artifact Registry, gcr.io and docker.io, so the GCP stack needs a remote repository backed by https://registry.spanway.ai or a full mirror. The air-gapped page covers moving images into a disconnected environment.
Errors
| What you see | What it means | Fix |
|---|---|---|
cosign verify reports no matching signatures | The image was not signed by that key, or the tag moved. | Verify by digest, and check that the key matches your pinned copy. |
cosign asks for a transparency log entry | --insecure-ignore-tlog=true is missing. | Add it, releases are not written to the public log. |
unauthorized when pulling | The registry needs the credentials from your onboarding pack. | Run docker login registry.spanway.ai first. |
| The container exits at once with a read-only filesystem error | A volume the image needs is not writable. | Mount tmpfs volumes at /app/cache and /app/migrations and set XDG_CACHE_HOME and SPANWAY_MIGRATION_DIR as described above. |
| The migration fails because no Prisma engine is found | PRISMA_BINARY_CACHE_DIR was pointed away from /opt/prisma/binaries. | Remove the override so the baked engines are used. |
The Admin UI answers No Database connected. Set DATABASE_URL in .env... at sign-in | The container runs without a database. | Pass DATABASE_URL, or use the quickstart compose stack. |
usage: spanway-container <proxy|admin-agent|gateway|backend|worker|migrate|migrations-job|collector|metrics-server|assistant-index|dev|fips-check> [args], got (...) and exit code 2 | The container command was overridden and its first word is not a role. | Start the command with a role, for example spanway-container proxy --config /app/config.yaml, or pass only the arguments after the image name and keep the default entrypoint. |
exec: "sh": executable file not found in $PATH from docker exec or kubectl exec | The images have no shell. | Run a program directly, for example docker exec -it <container> spanwayctl --help or python -c "...". |
DATABASE_URL is not set and could not be assembled from the DATABASE_* env vars, so migrations cannot run. and exit code 1 | The migrations job has neither DATABASE_URL nor the DATABASE_HOST, DATABASE_USERNAME and DATABASE_NAME variables. | Pass DATABASE_URL, or the DATABASE_* variables your chart or Terraform stack sets. |
Migration job failed after retries. and exit code 1 | prisma migrate deploy failed on every attempt. | Read the Prisma error above it in the job log, fix the database access or the failed migration, then rerun the job. |
Logs
| Level | Line | Meaning | Action |
|---|---|---|---|
| INFO | Starting prisma migration job (use_migrate=True, use_v2_resolver=True) | The migrations job started. use_migrate=False means USE_PRISMA_DB_PUSH is on. | None, unless the values are not the ones you set. |
| INFO | Migration job completed successfully. | Every migration is applied and the request-log indexes exist. | None. |
| ERROR | DATABASE_URL is not set and could not be assembled from the DATABASE_* env vars, so migrations cannot run. | The job has no database address. | Pass DATABASE_URL or the DATABASE_* variables. |
| ERROR | Migration job failed after retries. | The migrations could not be applied. | Read the Prisma error above it and rerun the job. |
Related
- Release cycle for how releases are signed.
- Deployment options for which asset runs which image.
- Air-gapped installs for mirroring images.