File tree 6 files changed +61
-3
lines changed
6 files changed +61
-3
lines changed Original file line number Diff line number Diff line change 11
11
runs-on : ubuntu-latest
12
12
strategy :
13
13
matrix :
14
- version : ['7.4', '8.0']
14
+ version : ['7.4', '8.0', '8.1' ]
15
15
16
16
steps :
17
17
- name : Checkout code
Original file line number Diff line number Diff line change
1
+ FROM kooldev/php:8.1
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" ]
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ source /etc/profile
4
+
5
+ exec " $@ "
Original file line number Diff line number Diff line change @@ -49,8 +49,9 @@ docker run --rm --init -it -v $(pwd):/app -w /app kooldev/phpqa:7.4
49
49
50
50
The image built is [ ` kooldev/phpqa ` ] ( https://hub.docker.com/r/kooldev/phpqa/tags?page=1&ordering=last_updated ) with tags:
51
51
52
- - [ ** ` 7.4 ` ** ] ( https://github.com/kool-dev/docker-phpqa/blob/main/7.4 /Dockerfile )
52
+ - [ ** ` 8.1 ` ** ] ( https://github.com/kool-dev/docker-phpqa/blob/main/8.1 /Dockerfile )
53
53
- [ ** ` 8.0 ` ** ] ( https://github.com/kool-dev/docker-phpqa/blob/main/8.0/Dockerfile )
54
+ - [ ** ` 7.4 ` ** ] ( https://github.com/kool-dev/docker-phpqa/blob/main/7.4/Dockerfile )
54
55
55
56
## Using ` kool.yml `
56
57
@@ -60,7 +61,7 @@ Examples of what you can do in a `kool` powered environment. Add to your `kool.y
60
61
# kool.yml
61
62
scripts :
62
63
# just an alias to the PHPQA container
63
- phpqa : kool docker kooldev/phpqa:8.0
64
+ phpqa : kool docker kooldev/phpqa:8.1
64
65
# using the alias to call each tool with predefined parameters
65
66
# assuming your application code is located in a `app/` folder
66
67
phan : kool run phpqa phan --color -p -l app -iy 5
Original file line number Diff line number Diff line change 30
30
"path" : " template/entrypoint"
31
31
}
32
32
]
33
+ },
34
+ {
35
+ "name" : " 8.1" ,
36
+ "data" : {
37
+ "from" : " kooldev/php:8.1"
38
+ },
39
+ "files" : [
40
+ {
41
+ "name" : " Dockerfile" ,
42
+ "path" : " template/Dockerfile"
43
+ }, {
44
+ "name" : " entrypoint.sh" ,
45
+ "path" : " template/entrypoint"
46
+ }
47
+ ]
33
48
}
34
49
]
35
50
}
Original file line number Diff line number Diff line change 7
7
- docker build --pull -t kooldev/phpqa:7.4 7.4
8
8
# PHP 8.0
9
9
- docker build --pull -t kooldev/phpqa:8.0 8.0
10
+ # PHP 8.1
11
+ - docker build --pull -t kooldev/phpqa:8.1 8.1
You can’t perform that action at this time.
0 commit comments