A Docker image for running PHP CodeSniffer with Aligent coding standards.
Run the linter against files in the current directory:
docker run -v $PWD:/code -u $(id -u):$(id -g) aligent/phpcs .
Add the following alias to your shell configuration file (~/.bashrc, ~/.zshrc, etc.):
alias phpcs='docker run -v $PWD:/code -u $(id -u):$(id -g) aligent/phpcs'
After adding the alias, reload your shell configuration:
source ~/.zshrc # or ~/.bashrc
You can then run the linter against a directory with:
phpcs <source_directory_to_check>
It scans the current directory if no argument is present.
This project supports building multi-architecture images (AMD64 and ARM64) using Docker Buildx.
Push to main and DockerHub will start building latest image.
# Build and push multi-arch image
docker buildx bake -f docker-bake.hcl
# Build with custom tag
DOCKER_TAG=1.0.0 docker buildx bake -f docker-bake.hcl
# Build with different PHP version
PHP_VERSION=8.3 docker buildx bake -f docker-bake.hcl
The hooks/ directory contains scripts for Docker Hub automated builds:
hooks/build - Creates buildx builder and runs multi-arch buildhooks/push - Skips default push (buildx already pushes)hooks/post_push - Skips post-push (images already pushed)Content type
Image
Digest
sha256:260900f4a…
Size
61.6 MB
Last updated
5 months ago
docker pull aligent/phpcs