All #awesome-ci Docker images
ansible-lint β’ ansible β’ awesome-ci β’ bandit β’ black β’ checkmake β’ eslint β’ file-lint β’ gofmt β’ goimports β’ golint β’ jsonlint β’ kubeval β’ linkcheck β’ mypy β’ php-cs-fixer β’ phpcbf β’ phpcs β’ phplint β’ pycodestyle β’ pydocstyle β’ pylint β’ terraform-docs β’ terragrunt-fmt β’ terragrunt β’ yamlfmt β’ yamllint
View Dockerfiles on GitHub.
Available Architectures: amd64
, i386
, arm64
, arm/v7
, arm/v6
, ppc64le
, s390x
Tiny Alpine-based multistage-build dockerized version of jsonlint[1], which adds additional functionality such as failure on wrong indentation, lint multiple files via wildcard search and being able to ignore files via wildcards. The image is built nightly against multiple stable versions and pushed to Dockerhub.
[1] Official project: https://github.com/zaach/jsonlint
The following Docker image tags are rolling releases and are built and updated every night.
Docker Tag | Git Ref | Jsonlint | Flavour | Available Architectures |
---|---|---|---|---|
latest |
master | latest | default | amd64 , i386 , arm64 , arm/v7 , arm/v6 , ppc64le , s390x |
alpine |
master | latest | Alpine | amd64 , i386 , arm64 , arm/v7 , arm/v6 , ppc64le , s390x |
1.6 |
master | 1.6.x |
default | amd64 , i386 , arm64 , arm/v7 , arm/v6 , ppc64le , s390x |
alpine-1.6.0 |
master | 1.6.x |
Alpine | amd64 , i386 , arm64 , arm/v7 , arm/v6 , ppc64le , s390x |
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.
Docker Tag | Git Ref | Jsonlint | Flavour | Available Architectures |
---|---|---|---|---|
latest-<tag> |
tag: <tag> |
latest | default | amd64 , i386 , arm64 , arm/v7 , arm/v6 , ppc64le , s390x |
alpine-latest-<tag> |
tag: <tag> |
latest | Alpine | amd64 , i386 , arm64 , arm/v7 , arm/v6 , ppc64le , s390x |
1.6-<tag> |
tag: <tag> |
1.6.x |
default | amd64 , i386 , arm64 , arm/v7 , arm/v6 , ppc64le , s390x |
alpine-1.6-<tag> |
tag: <tag> |
1.6.x |
Alpine | amd64 , i386 , arm64 , arm/v7 , arm/v6 , ppc64le , s390x |
Where
<tag>
refers to the chosen git tag from this repository.
The working directory inside the Docker container is /data/
and should be mounted locally to
where your JSON files are located.
$ docker run --rm cytopia/jsonlint --help
Usage: cytopia/jsonlint [-sti] <PATH-TO-FILE>
cytopia/jsonlint [-sti] <GLOB-PATTERN>
cytopia/jsonlint --version
cytopia/jsonlint --help
-s sort object keys
-t CHAR character(s) to use for indentation
-i <GLOB-PATTERN> Ignore glob pattern when using the GLOB-PATTERN for file search.
(e.g.: -i '\.terraform*.json')
Multiple ignores can be comma separated:
(e.g.: -i '\.terraform*.json,*test.json')
<PATH-TO-FILE> Path to file to validate
<GLOB-PATTERN> Glob pattern for recursive scanning. (e.g.: *\.json)
Anything that "find . -name '<GLOB-PATTERN>'" will take is valid.
$ docker run --rm -v $(pwd):/data cytopia/jsonlint -t ' ' -i '*.terraform/*' *.json
This behaviour is achieved by saving the JSON with fixed indentation within the container in a different location and then applying a diff against the original file.
$ docker run --rm -v $(pwd):/data cytopia/jsonlint -t ' ' *.json
jsonlint -c -t ' ' ./envs/dev/iam-permission/dev-policy.json
jsonlint -c -t ' ' ./envs/dev/iam-permission/ops-policy.json
--- ./envs/dev/iam-permission/ops-policy.json
+++ /tmp/ops-policy.json
@@ -154,7 +154,7 @@
"Sid": "SageMakerFull",
"Effect": "Allow",
"Action": [
- "sagemaker:*"
+ "sagemaker:*"
],
"Resource": "*"
},
π Related #awesome-ci projects
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:
GitHub | DockerHub | Type | Description |
---|---|---|---|
awesome-ci | Basic | Tools for git, file and static source code analysis | |
file-lint | Basic | Baisc source code analysis | |
linkcheck | Basic | Search for URLs in files and validate their HTTP status code | |
ansible | Ansible | Multiple versions and flavours of Ansible | |
ansible-lint | Ansible | Lint Ansible | |
gofmt | Go | Format Go source code [1] | |
goimports | Go | Format Go source code [1] | |
golint | Go | Lint Go code | |
eslint | Javascript | Lint Javascript code | |
jsonlint | JSON | Lint JSON files [1] | |
kubeval | K8s | Lint Kubernetes files | |
checkmake | Make | Lint Makefiles | |
phpcbf | PHP | PHP Code Beautifier and Fixer | |
phpcs | PHP | PHP Code Sniffer | |
phplint | PHP | PHP Code Linter [1] | |
php-cs-fixer | PHP | PHP Coding Standards Fixer | |
bandit | Python | A security linter from PyCQA | |
black | Python | The uncompromising Python code formatter | |
mypy | Python | Static source code analysis | |
pycodestyle | Python | Python style guide checker | |
pydocstyle | Python | Python docstyle checker | |
pylint | Python | Python source code, bug and quality checker | |
terraform-docs | Terraform | Terraform doc generator (TF 0.12 ready) [1] | |
terragrunt | Terraform | Terragrunt and Terraform | |
terragrunt-fmt | Terraform | terraform fmt for Terragrunt files [1] |
|
yamlfmt | Yaml | Format Yaml files [1] | |
yamllint | Yaml | Lint Yaml files |
[1] Uses a shell wrapper to add enhanced functionality not available by original project.
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.
Copyright (c) 2019 cytopia