Harden the shipped images: run as a non-root user, give the orchestrator a real healthcheck, keep the build context small, pin the bundled tools, and remove Nix from the production agent image now that the Nix firmware build is disabled (MVP-0.4) — a smaller image and a much smaller attack surface.
What to change
Non-root USER in the agent and dashboard images.
HEALTHCHECK wired to the real /health probe (see MVP-1.1).
.dockerignore so the build context stays minimal.
Pin syft, semgrep and cargo-audit --locked to explicit versions.
Remove Nix from the prod agent image.
Acceptance
Containers run as a non-root UID and start with a read-only-friendly layout; volumes for blobs and snapshots still work.
docker inspect shows a healthcheck that turns unhealthy when /health reports down.
Tool versions are pinned and recorded in the evidence-pack manifest (MVP-3.3).
The production agent image contains no Nix store or nix binary, and the image is measurably smaller.
Trivy scan of the image passes the gate added in MVP-4.1.
## Goal
Harden the shipped images: run as a non-root user, give the orchestrator a real healthcheck, keep the build context small, pin the bundled tools, and remove Nix from the production agent image now that the Nix firmware build is disabled (MVP-0.4) — a smaller image and a much smaller attack surface.
## What to change
- Non-root `USER` in the agent and dashboard images.
- `HEALTHCHECK` wired to the real `/health` probe (see MVP-1.1).
- `.dockerignore` so the build context stays minimal.
- Pin syft, semgrep and `cargo-audit --locked` to explicit versions.
- **Remove Nix from the prod agent image.**
## Acceptance
- [ ] Containers run as a non-root UID and start with a read-only-friendly layout; volumes for blobs and snapshots still work.
- [ ] `docker inspect` shows a healthcheck that turns unhealthy when `/health` reports down.
- [ ] Tool versions are pinned and recorded in the evidence-pack manifest (MVP-3.3).
- [ ] The production agent image contains no Nix store or `nix` binary, and the image is measurably smaller.
- [ ] Trivy scan of the image passes the gate added in MVP-4.1.
sharang
added this to the Production MVP milestone 2026-09-20 20:16:06 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Goal
Harden the shipped images: run as a non-root user, give the orchestrator a real healthcheck, keep the build context small, pin the bundled tools, and remove Nix from the production agent image now that the Nix firmware build is disabled (MVP-0.4) — a smaller image and a much smaller attack surface.
What to change
USERin the agent and dashboard images.HEALTHCHECKwired to the real/healthprobe (see MVP-1.1)..dockerignoreso the build context stays minimal.cargo-audit --lockedto explicit versions.Acceptance
docker inspectshows a healthcheck that turns unhealthy when/healthreports down.nixbinary, and the image is measurably smaller.