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
2 changes: 1 addition & 1 deletion .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
version: ['7.4', '8.0', '8.1']
version: ['7.4', '8.0', '8.1', '8.2', '8.3']

steps:
- name: Checkout code
Expand Down
35 changes: 35 additions & 0 deletions 8.2/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
FROM kooldev/php:8.2

# make Composer global vendor/bin available through PATH
RUN echo "export PATH=\$PATH:\/root\/.composer\/vendor\/bin:\/phars/" | tee -a /etc/profile

# install dependencies (ast)
RUN apk add --no-cache --virtual .build-deps $PHPIZE_DEPS \
&& pecl install ast \
&& echo 'extension=ast.so' >> /usr/local/etc/php/php.ini \
&& docker-php-ext-enable xdebug \
&& apk del .build-deps \
&& rm -rf /var/cache/apk/* /tmp/*

# install QA tools
RUN \
# install and set up QA tools from Composer
composer global require squizlabs/php_codesniffer \
phpstan/phpstan \
friendsofphp/php-cs-fixer \
phan/phan \
# download PHAR and make them executable
&& mkdir /phars \
&& curl -Lf https://phpmd.org/static/latest/phpmd.phar -o /phars/phpmd \
&& 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 \
&& curl -Lf https://phar.phpunit.de/phpcpd.phar -o /phars/phpcpd \
&& curl -Lf https://phar.phpunit.de/phpunit-9.5.phar -o /phars/phpunit \
&& chmod +x /phars/* \
# post-install tools settings
&& /phars/local-php-security-checker --update-cache

ADD entrypoint.sh /kool/entrypoint.sh
RUN chmod +x /kool/entrypoint.sh

ENTRYPOINT [ "/kool/entrypoint.sh" ]
CMD [ "composer", "--version" ]
5 changes: 5 additions & 0 deletions 8.2/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

source /etc/profile

exec "$@"
35 changes: 35 additions & 0 deletions 8.3/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
FROM kooldev/php:8.3

# make Composer global vendor/bin available through PATH
RUN echo "export PATH=\$PATH:\/root\/.composer\/vendor\/bin:\/phars/" | tee -a /etc/profile

# install dependencies (ast)
RUN apk add --no-cache --virtual .build-deps $PHPIZE_DEPS \
&& pecl install ast \
&& echo 'extension=ast.so' >> /usr/local/etc/php/php.ini \
&& docker-php-ext-enable xdebug \
&& apk del .build-deps \
&& rm -rf /var/cache/apk/* /tmp/*

# install QA tools
RUN \
# install and set up QA tools from Composer
composer global require squizlabs/php_codesniffer \
phpstan/phpstan \
friendsofphp/php-cs-fixer \
phan/phan \
# download PHAR and make them executable
&& mkdir /phars \
&& curl -Lf https://phpmd.org/static/latest/phpmd.phar -o /phars/phpmd \
&& 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 \
&& curl -Lf https://phar.phpunit.de/phpcpd.phar -o /phars/phpcpd \
&& curl -Lf https://phar.phpunit.de/phpunit-9.5.phar -o /phars/phpunit \
&& chmod +x /phars/* \
# post-install tools settings
&& /phars/local-php-security-checker --update-cache

ADD entrypoint.sh /kool/entrypoint.sh
RUN chmod +x /kool/entrypoint.sh

ENTRYPOINT [ "/kool/entrypoint.sh" ]
CMD [ "composer", "--version" ]
5 changes: 5 additions & 0 deletions 8.3/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

source /etc/profile

exec "$@"
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ docker run --rm --init -it -v $(pwd):/app -w /app kooldev/phpqa:7.4

The image built is [`kooldev/phpqa`](https://hub.docker.com/r/kooldev/phpqa/tags?page=1&ordering=last_updated) with tags:

- [**`8.3`**](https://github.com/kool-dev/docker-phpqa/blob/main/8.3/Dockerfile)
- [**`8.2`**](https://github.com/kool-dev/docker-phpqa/blob/main/8.2/Dockerfile)
- [**`8.1`**](https://github.com/kool-dev/docker-phpqa/blob/main/8.1/Dockerfile)
- [**`8.0`**](https://github.com/kool-dev/docker-phpqa/blob/main/8.0/Dockerfile)
- [**`7.4`**](https://github.com/kool-dev/docker-phpqa/blob/main/7.4/Dockerfile)
Expand Down
30 changes: 30 additions & 0 deletions fwd-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,36 @@
"path": "template/entrypoint"
}
]
},
{
"name": "8.2",
"data": {
"from": "kooldev/php:8.2"
},
"files": [
{
"name": "Dockerfile",
"path": "template/Dockerfile"
}, {
"name": "entrypoint.sh",
"path": "template/entrypoint"
}
]
},
{
"name": "8.3",
"data": {
"from": "kooldev/php:8.3"
},
"files": [
{
"name": "Dockerfile",
"path": "template/Dockerfile"
}, {
"name": "entrypoint.sh",
"path": "template/entrypoint"
}
]
}
]
}
4 changes: 4 additions & 0 deletions kool.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ scripts:
- docker build --pull -t kooldev/phpqa:8.0 8.0
# PHP 8.1
- docker build --pull -t kooldev/phpqa:8.1 8.1
# PHP 8.2
- docker build --pull -t kooldev/phpqa:8.2 8.2
# PHP 8.3
- docker build --pull -t kooldev/phpqa:8.3 8.3