Sign inSign up

aligent/phpcs

By aligent

•Updated 5 months ago

Buildkit cache
Image
0

736

aligent/phpcs repository overview

⁠Aligent PHPCS

A Docker image for running PHP CodeSniffer with Aligent coding standards.

⁠Usage

Run the linter against files in the current directory:

docker run -v $PWD:/code -u $(id -u):$(id -g) aligent/phpcs .

⁠Creating an Alias

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.

⁠Building Multi-Architecture Images

This project supports building multi-architecture images (AMD64 and ARM64) using Docker Buildx.

⁠Automated Build

Push to main and DockerHub will start building latest image.

⁠Manual Build
# 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
⁠Docker Hub Automated Builds

The hooks/ directory contains scripts for Docker Hub automated builds:

  • hooks/build - Creates buildx builder and runs multi-arch build
  • hooks/push - Skips default push (buildx already pushes)
  • hooks/post_push - Skips post-push (images already pushed)

Tag summary

Content type

Image

Digest

sha256:260900f4a…

Size

61.6 MB

Last updated

5 months ago

docker pull aligent/phpcs