# Set the version you want to installVERSION=0.19.4# Download and installcurl -sL "https://github.com/jarfernandez/check-image/releases/download/v${VERSION}/check-image_${VERSION}_darwin_arm64.tar.gz" | tar xzsudo mv check-image /usr/local/bin/# Verify installationcheck-image version
# Set the version you want to installVERSION=0.19.4# Download and installcurl -sL "https://github.com/jarfernandez/check-image/releases/download/v${VERSION}/check-image_${VERSION}_linux_amd64.tar.gz" | tar xzsudo mv check-image /usr/local/bin/# Verify installationcheck-image version
# Install the latest versiongo install github.com/jarfernandez/check-image/cmd/check-image@latest# Or install a specific versiongo install github.com/jarfernandez/check-image/cmd/[email protected]
Requirements: Go 1.26 or newer
Binaries installed with go install will show version as dev when running check-image version. This is expected behavior as go install compiles from source without version injection. For production use with correct version numbers, use pre-built binaries from releases.
Mount a local config directory to use policy files:
# Mount a local config directorydocker run --rm \ -v "$(pwd)/config:/config:ro" \ ghcr.io/jarfernandez/check-image:latest \ registry nginx:latest \ --registry-policy /config/registry-policy.json# Run all checks with a config filedocker run --rm \ -v "$(pwd)/config:/config:ro" \ ghcr.io/jarfernandez/check-image:latest \ all nginx:latest \ --config /config/config.yaml
Mounting the Docker socket grants the container full access to the Docker daemon, which is equivalent to root access on the host. Only use this in trusted environments.
docker run --rm \ -v /var/run/docker.sock:/var/run/docker.sock \ ghcr.io/jarfernandez/check-image:latest \ age my-local-image:latest
Without the Docker socket mounted (the default), check-image automatically uses the remote registry to fetch image metadata. This is the recommended approach for CI/CD pipelines.
This runs all 10 checks with default settings. Checks that require additional configuration (registry, labels, platform) will report an error unless their configuration is provided.
The action downloads the check-image binary from GitHub Releases, so no additional dependencies are needed for validating remote registry images. To validate local Docker images (e.g., after docker build), Docker must be available on the runner — this is satisfied by default on ubuntu-latest runners.