forked from chekalsky/phpcs-action
-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (31 loc) · 930 Bytes
/
Dockerfile
File metadata and controls
37 lines (31 loc) · 930 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
FROM php:8.0-cli-alpine
# Install build dependencies
RUN set -eux \
&& apk add --no-cache \
ca-certificates \
coreutils \
curl \
git \
php8-simplexml \
php8-tokenizer \
php8-xmlreader \
php8-xmlwriter \
php-xml \
&& git clone -b 3.x https://github.com/PHPCSStandards/PHP_CodeSniffer
# Install PHP CodeSniffer
RUN set -eux \
&& cd PHP_CodeSniffer \
&& VERSION="$( git describe --abbrev=0 --tags )" \
&& curl -sS -L https://github.com/PHPCSStandards/PHP_CodeSniffer/releases/download/${VERSION}/phpcs.phar -o /phpcs.phar \
&& chmod +x /phpcs.phar \
&& mv /phpcs.phar /usr/bin/phpcs \
&& phpcs --version
# Install PHP Composer
RUN set -eux \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer \
&& composer --version
COPY entrypoint.sh \
problem-matcher.json \
/action/
RUN chmod +x /action/entrypoint.sh
ENTRYPOINT ["/action/entrypoint.sh"]