Skip to content

build(docker): add OpenShift in-cluster build variants for supervisor and gateway images - #3236

Draft
akram wants to merge 1 commit into
NVIDIA:mainfrom
akram:refactor/sandbox-alpine-default
Draft

build(docker): add OpenShift in-cluster build variants for supervisor and gateway images#3236
akram wants to merge 1 commit into
NVIDIA:mainfrom
akram:refactor/sandbox-alpine-default

Conversation

@akram

@akram akram commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Add multi-stage Dockerfiles that build the OpenShell supervisor and gateway images entirely inside an OpenShift/Buildah cluster, for environments without the upstream Nix CI pipeline that stages prebuilt binaries. The upstream Dockerfile.* and the CI binary pipeline are unchanged, and image-name resolution is unchanged.

Related Issue

Relates to #3116. This PR only adds in-cluster build tooling; it does not change the default sandbox image resolution.

Changes

  • deploy/docker/Dockerfile.supervisor.multistage: builds the static musl openshell-sandbox via the Nix musl devShell, then an alpine:3.22 runtime stage identical to Dockerfile.supervisor (nftables/iptables, COPY --chmod=0555).
  • deploy/docker/Dockerfile.gateway.multistage: builds openshell-gateway via the Nix glibc-2-28 devShell, normalizes the ELF interpreter with patchelf and asserts z3 is statically embedded, then a distroless/cc-debian13 runtime stage identical to Dockerfile.gateway.
  • Each builder collapses build + cleanup into a single RUN so the Nix store never enters the committed layer (fast intermediate commit, fits the node's ephemeral-storage budget).

Testing

Both images built in-cluster on OpenShift (amd64) and run:

  • supervisor: Alpine image, static musl binary (lddld-musl only), executes natively on Alpine.
  • gateway: distroless image, glibc binary runs; deployed to openshell-system, pod 1/1 Running, serves on :8080 and health on :8081.

Checklist

  • Conventional commit, signed off (DCO)
  • Upstream Dockerfiles and CI pipeline unchanged
  • No behavior change to image resolution

@copy-pr-bot

copy-pr-bot Bot commented Sep 9, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@akram akram closed this Sep 9, 2026
@akram akram reopened this Sep 9, 2026
@akram
akram marked this pull request as draft September 9, 2026 10:29
… and gateway

Add multi-stage Dockerfiles that build the OpenShell supervisor and gateway
images entirely inside an OpenShift/Buildah cluster, for environments without
the upstream Nix CI pipeline that stages prebuilt binaries under
deploy/docker/.build/prebuilt-binaries.

Both reproduce the exact upstream artifacts by running the project's own Nix
devShells in a builder stage, then assembling a runtime stage identical to the
existing Dockerfile.supervisor / Dockerfile.gateway:

- Dockerfile.supervisor.multistage: builds the static musl openshell-sandbox
  binary via the musl devShell; runtime is alpine:3.22 with nftables/iptables
  and COPY --chmod=0555.
- Dockerfile.gateway.multistage: builds openshell-gateway via the glibc-2-28
  devShell, normalizes the ELF interpreter with patchelf and asserts z3 is
  statically embedded; runtime is distroless cc-debian13.

Each builder collapses build and cleanup into a single RUN so the Nix store
never enters the committed layer, keeping the intermediate commit small and
within the node's ephemeral-storage budget. The upstream Dockerfiles and CI
binary pipeline are unchanged.

Signed-off-by: Akram
Signed-off-by: Akram <akram.benaissi@gmail.com>
@akram
akram force-pushed the refactor/sandbox-alpine-default branch from 1344ed3 to e3e2878 Compare September 10, 2026 16:21
@akram akram changed the title refactor(docker)!: retire community images, build Alpine supervisor and Debian gateway in OpenShell build(docker): add OpenShift in-cluster build variants for supervisor and gateway images Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant