forked from michaelw90/PHP-Lint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
26 lines (19 loc) · 1.13 KB
/
Dockerfile
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
FROM php:7.3-cli
LABEL "com.github.actions.name"="PHP Lint"
LABEL "com.github.actions.description"="Run Lint Against Pull Request"
LABEL "com.github.actions.icon"="eye"
LABEL "com.github.actions.color"="gray-dark"
LABEL version="1.0.0"
LABEL repository="http://github.com/michaelw90/php-lint"
LABEL homepage="http://github.com/michaelw90/php-lint"
LABEL maintainer="Michael Wright <[email protected]>"
RUN apt-get update && apt-get -y install zip unzip
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
RUN php -r "if (hash_file('sha384', 'composer-setup.php') === 'd53db3618baf35c244d7511df519fa9e1f357261cd61477c9a3eb66372fbdfdf7486e82c5ecf0cafce1ee43683c998d2') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
RUN php composer-setup.php
RUN php -r "unlink('composer-setup.php');"
RUN mv composer.phar /usr/local/bin/composer
RUN mkdir /phplint && cd /phplint && composer require overtrue/phplint && ln -s /phplint/vendor/bin/phplint /usr/local/bin/phplint
COPY "entrypoint.sh" "/entrypoint.sh"
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]