Skip to main content

Configuration

Each field is set as KNOCK_<FIELD> (the property name upper-cased). JSON-typed fields (registries, transform_ca_certs, transform_package_mirrors, retention) take a JSON value whose shape is documented in the schemas section. The machine-readable contract is config.schema.json.

VariableTypeDefaultDescription
KNOCK_LABEL_PREFIXstringio.knockPrefix for knock's own provenance annotations; empty ⇒ no knock labels (OCI-standard keys only).
KNOCK_REGISTRIESJSON object{}JSON map of logical registry name → RegistryConfig. At least one is needed to reconcile.
KNOCK_LOG_FORMATstringtextLog output format: text or json.
KNOCK_LOG_LEVELstringINFOMinimum log level.
KNOCK_DRY_RUN_TAGSbooleanfalseSkip image copies / pushes.
KNOCK_DRY_RUN_DELETIONSbooleanfalseSkip deletions.
KNOCK_DELETION_MODEstringpurgeGlobal baseline of the deletion-mode cascade.
KNOCK_RETENTIONJSON object(unset)Global tier of the retention cascade (a JSON Archive); unset ⇒ retention off everywhere.
KNOCK_WORK_DIRstring/tmp/knock-workScratch directory for build contexts.
KNOCK_TRANSFORM_CA_CERTSJSON object{}JSON map of name → CA source, resolved by the injectCA transform.
KNOCK_TRANSFORM_PACKAGE_MIRRORSJSON object{}JSON map of name → package mirror, resolved by rewritePackageSources.
KNOCK_BUILD_PLATFORMstringlinux/amd64Platform for the rebuild path (single-platform).
KNOCK_SBOM_FORMATSJSON list["spdx-json"]SBOM formats syft emits on every placed image (copy and rebuild), as a JSON list. Allowed: spdx-json, cyclonedx-json. Non-empty — the knob chooses which formats, never whether (always-on coverage).
KNOCK_MAX_CONCURRENCYinteger4Max parallel tag operations per run (1 = sequential).
KNOCK_ATTEST_SIGNERstring(empty)Signing mode for SLSA attestations on the rebuild path; empty ⇒ off.
KNOCK_ATTEST_KEY_REFstring(empty)KMS URI (kms) or key path (key).
KNOCK_ATTEST_FULCIO_URLstring(empty)Keyless CA URL; blank ⇒ public Fulcio for keyless, no CA for kms/key.
KNOCK_ATTEST_REKOR_URLstring(empty)Transparency-log URL; blank ⇒ public Rekor for keyless, no log for kms/key.
KNOCK_ATTEST_BUILDER_IDstring(empty)URI identifying this knock builder.
KNOCK_ATTEST_VERIFY_IDENTITYstring(empty)Keyless verify identity regexp (KNOCK_ATTEST_VERIFY_IDENTITY).
KNOCK_ATTEST_VERIFY_OIDC_ISSUERstring(empty)Keyless verify OIDC issuer (KNOCK_ATTEST_VERIFY_OIDC_ISSUER).
KNOCK_USAGE_ORACLE_CMDstring(unset)Executable speaking the usage-oracle contract; required to run knock purge.
KNOCK_USAGE_ORACLE_TIMEOUTinteger30Per-query timeout (seconds) for the usage oracle.
KNOCK_PURGE_MIN_IDLE_DAYSinteger(unset)Idle window knock purge requires before reaping a marked tag.