validate-config subcommand

This subcommand validates configuration files for the customize subcommand without running the actual customization process. For that reason, it does not require root permissions and can be executed by non-privileged users.

Added in v1.2.

--config-file=FILE-PATH

Required.

The file path of the YAML (or JSON) configuration file that specifies how an image should be customized.

For documentation on the supported configuration options, see: Image Customizer configuration

Added in v1.2.

--build-dir=DIRECTORY-PATH

Optional. Required when --validate-resources includes oci or all.

The directory where the tool will place its temporary files, if required.

Added in v1.2.

--validate-resources=RESOURCE[,RESOURCE...]

Optional.

Can be specified multiple times or as a comma-separated list.

Specifies which resources referenced in the configuration should be validated for existence. Without this flag, only the configuration syntax and structure are validated.

Supported options:

Added in v1.2.

Examples

Validate configuration syntax only:

imagecustomizer validate-config --config-file=./config.yaml

Validate configuration syntax and local files:

imagecustomizer validate-config --config-file=./config.yaml --validate-resources=files

Validate configuration syntax, local files, and OCI artifacts using a comma-separated list:

imagecustomizer validate-config --build-dir=./build --config-file=./config.yaml --validate-resources=files,oci

Validate configuration syntax, local files, and OCI artifacts by specifying the option multiple times:

imagecustomizer validate-config --build-dir=./build --config-file=./config.yaml --validate-resources=files \
  --validate-resources=oci

Validate everything:

imagecustomizer validate-config --build-dir=./build --config-file=./config.yaml --validate-resources=all