Skip to content

Commit 97b3de4

Browse files
committed
add support for PHP 8.3
1 parent 8562fbd commit 97b3de4

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

8.3/Dockerfile

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
FROM kooldev/php:8.3
2+
3+
# make Composer global vendor/bin available through PATH
4+
RUN echo "export PATH=\$PATH:\/root\/.composer\/vendor\/bin:\/phars/" | tee -a /etc/profile
5+
6+
# install dependencies (ast)
7+
RUN apk add --no-cache --virtual .build-deps $PHPIZE_DEPS \
8+
&& pecl install ast \
9+
&& echo 'extension=ast.so' >> /usr/local/etc/php/php.ini \
10+
&& docker-php-ext-enable xdebug \
11+
&& apk del .build-deps \
12+
&& rm -rf /var/cache/apk/* /tmp/*
13+
14+
# install QA tools
15+
RUN \
16+
# install and set up QA tools from Composer
17+
composer global require squizlabs/php_codesniffer \
18+
phpstan/phpstan \
19+
friendsofphp/php-cs-fixer \
20+
phan/phan \
21+
# download PHAR and make them executable
22+
&& mkdir /phars \
23+
&& curl -Lf https://phpmd.org/static/latest/phpmd.phar -o /phars/phpmd \
24+
&& curl -Lf https://github.com/fabpot/local-php-security-checker/releases/download/v1.0.0/local-php-security-checker_1.0.0_linux_amd64 -o /phars/local-php-security-checker \
25+
&& curl -Lf https://phar.phpunit.de/phpcpd.phar -o /phars/phpcpd \
26+
&& curl -Lf https://phar.phpunit.de/phpunit-9.5.phar -o /phars/phpunit \
27+
&& chmod +x /phars/* \
28+
# post-install tools settings
29+
&& /phars/local-php-security-checker --update-cache
30+
31+
ADD entrypoint.sh /kool/entrypoint.sh
32+
RUN chmod +x /kool/entrypoint.sh
33+
34+
ENTRYPOINT [ "/kool/entrypoint.sh" ]
35+
CMD [ "composer", "--version" ]

8.3/entrypoint.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
3+
source /etc/profile
4+
5+
exec "$@"

0 commit comments

Comments
 (0)