feat: add sealed Containerfile for Rust CLI (Nix retirement escape hatch) - #49
Merged
Conversation
…tch) Nix was retired estate-wide on 2026-06-01; flake.nix no longer satisfies the governance container gate on its own. This adds a real, two-stage Containerfile (Wolfi rust-1.89 builder -> chainguard/glibc-dynamic runtime) that actually compiles invariant-path-cli and runs it as a non-root user. flake.nix is left in place since the Guix side isn't wired up yet. Verified: podman build -t invariant-path-verify:latest -f Containerfile . -> exit 0 Verified: podman run --rm invariant-path-verify:latest --help -> prints real CLI help Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
flake.nixno longer satisfies the governance container-packaging gate on its own for repos that have a real toolchain (Rust here); a sealed, buildableContainerfileis the accepted escape hatch.Containerfile:cgr.dev/chainguard/wolfi-base:latest, installsrust-1.89(Wolfi's rust package bundles bothrustcandcargo— there is no separate barecargopackage) +gcc, then runscargo build --release -p invariant-path-cli(this repo's actual CLI binary crate; edition 2021 perCargo.toml, norust-toolchain.tomlpin exists to honour instead).cgr.dev/chainguard/glibc-dynamic:latest, copies in the built binary, runs asUSER nonroot,ENTRYPOINT ["/usr/bin/invariant-path-cli"].MPL-2.0, matchingLICENSE,Cargo.toml, and everysrc/*.rsheader in this repo (not the AGPL variant used on co-developed repos).flake.nixis left untouched — the Guix side isn't wired up yet, so removing it would leave no usable Nix-era dev environment for anyone still relying on it.Verification (real, not asserted)
Both the build and a smoke-test run of the produced binary exit 0 with genuine CLI output, not a placeholder.
Note on branch contents
This branch also carries 2 pre-existing local commits (
ebbd558,3e0fd0e) that were ahead oforigin/mainbefore this work started and are unrelated to container packaging. Only theContainerfilecommit (49d7f74) is new in this PR.Test plan
podman build -t invariant-path-verify:latest -f Containerfile .exits 0podman run --rm invariant-path-verify:latest --helpprints real CLI helpContainerfilesatisfies the estate container-packaging governance gateGenerated with Claude Code