Skip to content

Hadolint Container Image

Lightweight wrapper around the official hadolint CLI for linting Dockerfiles in CI.

Features

  • Based on the upstream ghcr.io/hadolint/hadolint image with additional CA certificates and curl for fetching remote configurations.
  • GitLab CI Component at niclas-zone/ci/hadolint.

Usage

Pull the image

podman pull registry.gitlab.com/niclas-zone/ctr/hadolint:latest

Lint a Dockerfile

podman run --rm \
  -v $(pwd):/workspace \
  -w /workspace \
  registry.gitlab.com/niclas-zone/ctr/hadolint:latest \
  hadolint Dockerfile

GitLab CI snippet

lint:
  image: registry.gitlab.com/niclas-zone/ctr/hadolint:latest
  script:
    - hadolint Dockerfile

Author

Niclas Heinz

Contributing

Contributions are welcome! Please open an issue or submit a merge request if you have suggestions or improvements.

License

This project is licensed under the MIT License. See LICENSE for details.