/docker-yamllint

yamllint packaged as a container image, published by Contane

Primary LanguageDockerfileMIT LicenseMIT

docker-yamllint

yamllint packaged as a container image, published by Contane.

Usage

The image is Alpine-based. By default, it runs in the /data directory with the root user. A non-root user named yamllint is also available and should be used if possible. We build for linux/amd64 and linux/arm64 platforms.

See the yamllint documentation for available configuration options that can be set in a .yamllint.yaml or .yamllint.yml file in the working directory.

Command Line

To run yamllint on the current directory:

docker run --rm --user yamllint -v "$(pwd):/data" contane/yamllint -f colored .

GitLab CI

To use this image in a GitLab CI pipeline, add the following to your .gitlab-ci.yml:

yamllint:
  stage: test
  image:
    name: contane/yamllint
    entrypoint: ["/bin/ash", "-c"]
    docker:
      user: yamllint
  script:
    - yamllint -f colored .