Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,6 @@ jobs:
with:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
VERSION=3.11.1
24 changes: 21 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
FROM php:8.3-alpine
FROM php:8.4-alpine AS base

RUN apk add --no-cache patch
FROM base AS builder

RUN pear install PHP_CodeSniffer-3.7.2
RUN curl -OL https://phar.io/releases/phive.phar && \
curl -OL https://phar.io/releases/phive.phar.asc && \
apk add --no-cache --virtual .gpg gpg gpg-agent && \
gpg --keyserver hkps://keys.openpgp.org --recv-keys 0x9D8A98B29B2D5D79 && \
gpg --verify phive.phar.asc phive.phar && \
chmod +x phive.phar

ARG VERSION

RUN ./phive.phar install --trust-gpg-keys 689DAD778FF08760E046228BA978220305CD5C32 phpcs@$VERSION
RUN ./phive.phar install --trust-gpg-keys 689DAD778FF08760E046228BA978220305CD5C32 phpcbf@$VERSION

RUN /tools/phpcs --version
RUN /tools/phpcbf --version

FROM base

COPY --from=builder /tools/phpcs /usr/bin/phpcs
COPY --from=builder /tools/phpcbf /usr/bin/phpcbf
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# PHPCS

This is a docker image for [PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer)
This is a docker image for [PHP_CodeSniffer](https://github.com/PHPCSStandards/PHP_CodeSniffer)

## Usage

Expand Down