File tree Expand file tree Collapse file tree 4 files changed +66
-0
lines changed
Expand file tree Collapse file tree 4 files changed +66
-0
lines changed Original file line number Diff line number Diff line change 1+ {
2+ "output" : " ." ,
3+ "builds" : [
4+ {
5+ "name" : " 7.4" ,
6+ "data" : {
7+ "from" : " kooldev/php:7.4"
8+ },
9+ "files" : [
10+ {
11+ "name" : " Dockerfile" ,
12+ "path" : " template/Dockerfile"
13+ }, {
14+ "name" : " entrypoint.sh" ,
15+ "path" : " template/entrypoint"
16+ }
17+ ]
18+ }
19+ ]
20+ }
Original file line number Diff line number Diff line change 1+ scripts :
2+ template : kool docker fireworkweb/fwd:v1.0 fwd template
3+ build :
4+ # parse templates
5+ - kool run template
6+ # PHP 7.4
7+ - docker build --pull -t kooldev/phpqa:7.4 7.4
8+ # PHP 8.0
9+ # - docker build --pull -t kooldev/phpqa:8.0 8.0
Original file line number Diff line number Diff line change 1+ FROM {{ $from } }
2+
3+ # make Composer global vendor/bin available through PATH
4+ RUN sed -i 's/\(^export PATH=.*\)/\1:\/root\/.composer\/vendor\/bin:\/phars/' /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+ && apk del .build-deps \
11+ && rm -rf /var/cache/apk/* /tmp/*
12+
13+ # install QA tools
14+ RUN \
15+ # install and set up QA tools from Composer
16+ composer global require friendsofphp/php-cs-fixer phan/phan \
17+ # download PHAR and make them executable
18+ && mkdir /phars \
19+ && curl -Lf https://phpmd.org/static/latest/phpmd.phar -o /phars/phpmd \
20+ && 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 \
21+ && curl -Lf https://phar.phpunit.de/phpcpd.phar -o /phars/phpcpd \
22+ && curl -Lf https://phar.phpunit.de/phpunit-nightly.phar -o /phars/phpunit10 \
23+ && curl -Lf https://phar.phpunit.de/phpunit-9.5.phar -o /phars/phpunit \
24+ && chmod +x /phars/* \
25+ # post-install tools settings
26+ && /phars/local-php-security-checker --update-cache
27+
28+ ADD entrypoint.sh /kool/entrypoint.sh
29+ RUN chmod +x /kool/entrypoint.sh
30+
31+ ENTRYPOINT [ "/kool/entrypoint.sh" ]
32+ CMD [ "composer", "--version" ]
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ source /etc/profile
4+
5+ exec " $@ "
You can’t perform that action at this time.
0 commit comments