nerdctl build supports --source-policy-file
Introduced 2026-05-05 · score 0.96
HOW TO USE IT
When building a repository image with a BuildKit source policy, run `nerdctl build --source-policy-file <policy.json> <repository-path>`. The policy file is JSON; the documented no-op example is `{"rules":[]}`.
nerdctl build --source-policy-file <policy.json> <repository-path>WHY THIS HELPS
Build a repository image with a source policy file.
REQUIREMENTS AND LIMITATIONS
- Version: v2.3.0
- --source-policy-file <policy.json>: BuildKit source policy JSON file for reproducible builds.
- PATH (required): Build context path; the command usage requires `PATH`.
- Prerequisite: `buildkitd` must be running for `nerdctl build`.
FIRST-PARTY EVIDENCE
- https://github.com/containerd/nerdctl/releases/tag/v2.3.0
- https://github.com/containerd/nerdctl/blob/v2.3.0/docs/command-reference.md
Check the installed version and the source before using it. Entry JSON