kokuwaio/hadolint

By kokuwaio

Updated 4 days ago

A WoodpeckerCI plugin for hadolint to lint Dockerfiles.

Image
Integration & delivery
Developer tools
0

5.6K

kokuwaio/hadolint repository overview

Hadolint WoodpeckerCI Plugin

pulls size dockerfile license prs issues

A WoodpeckerCI plugin for hadolint to lint Dockerfiles.
Also usable with Gitlab, Github or locally, see examples for usage.

Features

  • preconfigure hadolint parameters
  • searches for Dockerfiles recursive
  • runnable with local docker daemon

Example

Woodpecker:

steps:
  hadolint:
    depends_on: []
    image: kokuwaio/hadolint:v2.14.0
    settings:
      strict-labels: true
      format: json
    when:
      event: pull_request
      path: [.hadolint.yaml, "**/Dockerfile"]

Gitlab: (using script is needed because of https://gitlab.com/gitlab-org/gitlab/-/issues/19717)

hadolint:
  needs: []
  stage: lint
  image:
    name: kokuwaio/hadolint:v2.14.0
    entrypoint: [""]
  script: [/usr/local/bin/entrypoint.sh]
  variables:
    PLUGIN_STRICT_LABELS: true
    PLUGIN_FORMAT: json
  rules:
    - if: $CI_PIPELINE_SOURCE == "merge_request_event"
      changes: [.hadolint.yaml, "**/Dockerfile"]

CLI:

docker run --rm --volume=$(pwd):$(pwd):ro --workdir=$(pwd) kokuwaio/hadolint --strict-labels --format=json

Settings

Settings NameEnvironmentDefaultDescription
no-failPLUGIN_NO_FAILnoneDon't exit with a failure status code when any rule is violated
no-colorPLUGIN_NO_COLORnoneDon't colorize output
strict-labelsPLUGIN_STRICT_LABELSnoneDo not permit labels other than specified in label-schema
disable-ignore-pragmaPLUGIN_DISABLE_IGNORE_PRAGMAnoneDisable inline ignore pragmas # hadolint ignore=DLxxxx
failure-thresholdPLUGIN_FAILURE_THRESHOLDstyleExit with failure code only when rules with a severity equal to or above THRESHOLD are violated. Accepted values: error, warning, info, style, ignore, none
formatPLUGIN_FORMATttyThe output format for the results: tty, json, checkstyle, codeclimate, gitlab_codeclimate, gnu, codacy, sonarqube, sarif
verbosePLUGIN_VERBOSEfalseEnables verbose logging of hadolint's output to stderr

Alternatives

ImageCommentamd64arm64
kokuwaio/hadolintWoodpecker pluginsizesize
hadolint/hadolintnot a Woodpecker plugin, officialsizesize
pipelinecomponents/hadolintnot a Woodpecker pluginsizesize

Tag summary

Content type

Image

Digest

sha256:b7898d6cf

Size

12.1 MB

Last updated

4 days ago

docker pull kokuwaio/hadolint:v2.14.0