cytopia/yamllint

By cytopia

Updated over 1 year ago

Alpine-based multistage-build of yamllint for reproducible usage in CI

Image

5M+

Docker image for yamllint

TagLicense

lintbuildnightly

View Dockerfiles on GitHub.

Available Architectures:amd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x

Tiny Alpine-based dockerized version of yamllint[1]. The image is built nightly against the latest stable version of yamllint and pushed to Dockerhub.

[1] Official project: https://github.com/adrienverge/yamllint

:whale: Available Docker image versions

Docker

Rolling releaess

The following Docker image tags are rolling releases and are built and updated every night.

nightly

Docker TagGit RefYamllintFlavourAvailable Architectures
latestmasterlatestdefaultamd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x
alpinemasterlatestAlpineamd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x
1master1.x.xdefaultamd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x
alpine-1master1.x.xAlpineamd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x

Point in time releases

The following Docker image tags are built once and can be used for reproducible builds. Its version never changes so you will have to update tags in your pipelines from time to time in order to stay up-to-date.

build

Docker TagGit RefYamllintFlavourAvailable Architectures
latest-0.10tag: <tag>latestdefaultamd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x
alpine-latest-0.10tag: <tag>latestAlpineamd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x
1-0.10tag: <tag>1.x.xdefaultamd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x
alpine-1-0.10tag: <tag>1.x.xAlpineamd64, i386, arm64, arm/v7, arm/v6, ppc64le, s390x

Where <tag> refers to the chosen git tag from this repository.

:open_file_folder: Docker mounts

The working directory inside the Docker container is /data/ and should be mounted locally to the root of your project where your .yamllint file is located.

:computer: Usage

Command line
docker run --rm -it -v $(pwd):/data cytopia/yamllint .
Makefile
ifneq (,)
.error This Makefile requires GNU Make.
endif

lint: lint-yaml

lint-yaml:
	@docker run --rm $$(tty -s && echo "-it" || echo) -v $(PWD):/data cytopia/yamllint:latest .
GitLab CI
stages:
 - lint

lint-yaml:
  stage: lint
  image:
    name: cytopia/yamllint
    entrypoint: ["/bin/ash", "-c"]
  script:
    - yamllint -f colored .

:arrows_counterclockwise: Related #awesome-ci projects

Docker images

Save yourself from installing lot's of dependencies and pick a dockerized version of your favourite linter below for reproducible local or remote CI tests:

GitHubDockerHubTypeDescription
awesome-ciaci-hub-imgBasicTools for git, file and static source code analysis
file-lintflint-hub-imgBasicBaisc source code analysis
linkchecklinkcheck-hub-imgBasicSearch for URLs in files and validate their HTTP status code
ansibleansible-hub-imgAnsibleMultiple versions and flavours of Ansible
ansible-lintalint-hub-imgAnsibleLint Ansible
gofmtgfmt-hub-imgGoFormat Go source code [1]
goimportsgimp-hub-imgGoFormat Go source code [1]
golintglint-hub-imgGoLint Go code
eslintelint-hub-imgJavascriptLint Javascript code
jsonlintjlint-hub-imgJSONLint JSON files [1]
kubevalkubeval-hub-imgK8sLint Kubernetes files
checkmakecm-hub-imgMakeLint Makefiles
phpcbfpcbf-hub-imgPHPPHP Code Beautifier and Fixer
phpcspcs-hub-imgPHPPHP Code Sniffer
phplintplint-hub-imgPHPPHP Code Linter [1]
php-cs-fixerpcsf-hub-imgPHPPHP Coding Standards Fixer
banditbandit-hub-imgPythonA security linter from PyCQA
blackblack-hub-imgPythonThe uncompromising Python code formatter
mypymypy-hub-imgPythonStatic source code analysis
pycodestylepycs-hub-imgPythonPython style guide checker
pydocstylepyds-hub-imgPythonPython docstyle checker
pylintpylint-hub-imgPythonPython source code, bug and quality checker
terraform-docstfdocs-hub-imgTerraformTerraform doc generator (TF 0.12 ready) [1]
terragrunttg-hub-imgTerraformTerragrunt and Terraform
terragrunt-fmttgfmt-hub-imgTerraformterraform fmt for Terragrunt files [1]
yamlfmtyfmt-hub-imgYamlFormat Yaml files [1]
yamllintylint-hub-imgYamlLint Yaml files

[1] Uses a shell wrapper to add enhanced functionality not available by original project.

Makefiles

Visit cytopia/makefiles for dependency-less, seamless project integration and minimum required best-practice code linting for CI. The provided Makefiles will only require GNU Make and Docker itself removing the need to install anything else.

:page_facing_up: License

MIT License

Copyright (c) 2019 cytopia

Docker Pull Command

docker pull cytopia/yamllint