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
Tiny Alpine-based dockerized version of PHP[1], which defaults to linting mode and adds the option to ignore files and paths. The image is built nightly against multiple stable versions and pushed to Dockerhub.
- [1] Official project: https://github.com/php/php-src
The following Docker image tags are rolling releases and are built and updated every night.
Docker Tag | Git Ref | PHP | Flavour | Available Architectures |
---|---|---|---|---|
latest |
master | latest | default | amd64 , i386 , arm64 , arm/v7 , arm/v6 |
alpine |
master | latest | Alpine | amd64 , i386 , arm64 , arm/v7 , arm/v6 |
debian |
master | latest | Debian | amd64 , i386 , arm64 , arm/v7 , arm/v6 |
8.1 |
master | 8.1.x |
default | amd64 , i386 , arm64 , arm/v7 , arm/v6 |
8.1-alpine |
master | 8.1.x |
Alpine | amd64 , i386 , arm64 , arm/v7 , arm/v6 |
8.1-debian |
master | 8.1.x |
Debian | amd64 , i386 , arm64 , arm/v7 , arm/v6 |
8.0 |
master | 8.0.x |
default | amd64 , i386 , arm64 , arm/v7 , arm/v6 |
8.0-alpine |
master | 8.0.x |
Alpine | amd64 , i386 , arm64 , arm/v7 , arm/v6 |
8.0-debian |
master | 8.0.x |
Debian | amd64 , i386 , arm64 , arm/v7 , arm/v6 |
7.4 |
master | 7.4.x |
default | amd64 , i386 , arm64 , arm/v7 , arm/v6 |
7.4-alpine |
master | 7.4.x |
Alpine | amd64 , i386 , arm64 , arm/v7 , arm/v6 |
7.4-debian |
master | 7.4.x |
Debian | amd64 , i386 , arm64 , arm/v7 , arm/v6 |
7.3 |
master | 7.3.x |
default | amd64 , i386 , arm64 , arm/v7 , arm/v6 |
7.3-alpine |
master | 7.3.x |
Alpine | amd64 , i386 , arm64 , arm/v7 , arm/v6 |
7.3-debian |
master | 7.3.x |
Debian | amd64 , i386 , arm64 , arm/v7 , arm/v6 |
7.2 |
master | 7.2.x |
default | amd64 , i386 , arm64 , arm/v7 , arm/v6 |
7.2-alpine |
master | 7.2.x |
Alpine | amd64 , i386 , arm64 , arm/v7 , arm/v6 |
7.2-debian |
master | 7.2.x |
Debian | amd64 , i386 , arm64 , arm/v7 , arm/v6 |
7.1 |
master | 7.1.x |
default | amd64 , i386 , arm64 , arm/v7 , arm/v6 |
7.1-alpine |
master | 7.1.x |
Alpine | amd64 , i386 , arm64 , arm/v7 , arm/v6 |
7.1-debian |
master | 7.1.x |
Debian | amd64 , i386 , arm64 , arm/v7 , arm/v6 |
7.0 |
master | 7.0.x |
default | amd64 , i386 , arm64 , arm/v7 , arm/v6 |
7.0-alpine |
master | 7.0.x |
Alpine | amd64 , i386 , arm64 , arm/v7 , arm/v6 |
7.0-debian |
master | 7.0.x |
Debian | amd64 , i386 , arm64 , arm/v7 , arm/v6 |
5.6 |
master | 5.6.x |
default | amd64 , i386 , arm64 , arm/v7 , arm/v6 |
5.6-alpine |
master | 5.6.x |
Alpine | amd64 , i386 , arm64 , arm/v7 , arm/v6 |
5.6-debian |
master | 5.6.x |
Debian | amd64 , i386 , arm64 , arm/v7 , arm/v6 |
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 | PHP | Flavour | Available Architectures |
---|---|---|---|---|
latest-<tag> |
tag: <tag> |
latest | default | amd64 , i386 , arm64 , arm/v7 , arm/v6 |
alpine-<tag> |
tag: <tag> |
latest | Alpine | amd64 , i386 , arm64 , arm/v7 , arm/v6 |
debian-<tag> |
tag: <tag> |
latest | Debian | amd64 , i386 , arm64 , arm/v7 , arm/v6 |
8.1-<tag> |
tag: <tag> |
8.1.x |
default | amd64 , i386 , arm64 , arm/v7 , arm/v6 |
8.1-alpine-<tag> |
tag: <tag> |
8.1.x |
Alpine | amd64 , i386 , arm64 , arm/v7 , arm/v6 |
8.1-debian-<tag> |
tag: <tag> |
8.1.x |
Debian | amd64 , i386 , arm64 , arm/v7 , arm/v6 |
8.0-<tag> |
tag: <tag> |
8.0.x |
default | amd64 , i386 , arm64 , arm/v7 , arm/v6 |
8.0-alpine-<tag> |
tag: <tag> |
8.0.x |
Alpine | amd64 , i386 , arm64 , arm/v7 , arm/v6 |
8.0-debian-<tag> |
tag: <tag> |
8.0.x |
Debian | amd64 , i386 , arm64 , arm/v7 , arm/v6 |
7.4-<tag> |
tag: <tag> |
7.4.x |
default | amd64 , i386 , arm64 , arm/v7 , arm/v6 |
7.4-alpine-<tag> |
tag: <tag> |
7.4.x |
Alpine | amd64 , i386 , arm64 , arm/v7 , arm/v6 |
7.4-debian-<tag> |
tag: <tag> |
7.4.x |
Debian | amd64 , i386 , arm64 , arm/v7 , arm/v6 |
7.3-<tag> |
tag: <tag> |
7.3.x |
default | amd64 , i386 , arm64 , arm/v7 , arm/v6 |
7.3-alpine-<tag> |
tag: <tag> |
7.3.x |
Alpine | amd64 , i386 , arm64 , arm/v7 , arm/v6 |
7.3-debian-<tag> |
tag: <tag> |
7.3.x |
Debian | amd64 , i386 , arm64 , arm/v7 , arm/v6 |
7.2-<tag> |
tag: <tag> |
7.2.x |
default | amd64 , i386 , arm64 , arm/v7 , arm/v6 |
7.2-alpine-<tag> |
tag: <tag> |
7.2.x |
Alpine | amd64 , i386 , arm64 , arm/v7 , arm/v6 |
7.2-debian-<tag> |
tag: <tag> |
7.2.x |
Debian | amd64 , i386 , arm64 , arm/v7 , arm/v6 |
7.1-<tag> |
tag: <tag> |
7.1.x |
default | amd64 , i386 , arm64 , arm/v7 , arm/v6 |
7.1-alpine-<tag> |
tag: <tag> |
7.1.x |
Alpine | amd64 , i386 , arm64 , arm/v7 , arm/v6 |
7.1-debian-<tag> |
tag: <tag> |
7.1.x |
Debian | amd64 , i386 , arm64 , arm/v7 , arm/v6 |
7.0-<tag> |
tag: <tag> |
7.0.x |
default | amd64 , i386 , arm64 , arm/v7 , arm/v6 |
7.0-alpine-<tag> |
tag: <tag> |
7.0.x |
Alpine | amd64 , i386 , arm64 , arm/v7 , arm/v6 |
7.0-debian-<tag> |
tag: <tag> |
7.0.x |
Debian | amd64 , i386 , arm64 , arm/v7 , arm/v6 |
5.6-<tag> |
tag: <tag> |
5.6.x |
default | amd64 , i386 , arm64 , arm/v7 , arm/v6 |
5.6-alpine-<tag> |
tag: <tag> |
5.6.x |
Alpine | amd64 , i386 , arm64 , arm/v7 , arm/v6 |
5.6-debian-<tag> |
tag: <tag> |
5.6.x |
Debian | amd64 , i386 , arm64 , arm/v7 , arm/v6 |
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.
$ docker run -it --rm cytopia/phplint --help
Usage: cytopia/phplint [-i] <PATH-TO-FILE>
cytopia/phplint [-i] <GLOB-PATTERN>
cytopia/phplint --version
cytopia/phplint --help
-i <GLOB-PATTERN> Ignore glob pattern when using the GLOB-PATTERN for file search.
(e.g.: -i '\.test*.php')
<PATH-TO-FILE> Path to file to validate
<GLOB-PATTERN> Glob pattern for recursive scanning. (e.g.: *\.php)
Anything that "find . -name '<GLOB-PATTERN>'" will take is valid.
$ docker run -it --rm -v $(pwd):/data cytopia/phplint
find . -name "*.php" -type f -print0
php -d display_errors=1 -d error_reporting=-1 -l ./index.php
php -d display_errors=1 -d error_reporting=-1 -l ./config.php
php -d display_errors=1 -d error_reporting=-1 -l ./settings.php
Parse error: syntax error, unexpected 'echo' (T_ECHO), expecting ',' or ';' in ./settings.php on line 4
You can add the following Makefile to your project for easy generation of PHP linting.
ifneq (,)
.error This Makefile requires GNU Make.
endif
.PHONY: lint _update-phplint
CURRENT_DIR = $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
VERSION = 7.3
IGNORES = ./vendor/*
lint: _update-phplint
docker run -it --rm cytopia/phplint:${VERSION} -i ${IGNORES} '*.php'
_update-phplint:
docker pull cytopia/phplint:${VERSION}
With the above Makefile in place, you can easily add a Travis CI rule to ensure the terraform-docs output is always up-to-date and will fail otherwise (due to git changes):
---
sudo: required
language: minimal
services:
- docker
script:
- make lint
🔄 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