File tree Expand file tree Collapse file tree 2 files changed +12
-20
lines changed Expand file tree Collapse file tree 2 files changed +12
-20
lines changed Original file line number Diff line number Diff line change 1- FROM php:7
1+ FROM php:7.0-alpine
22
3- RUN apt-get update
4- RUN apt-get install -y zlib1g-dev git libzmq3 libzmq3-dev
5- RUN docker-php-ext-install zip mbstring
6-
7- RUN git clone https://github.com/nikic/php-ast.git /tmp/php-ast && \
3+ RUN apk --update add zlib-dev git && \
4+ docker-php-ext-install zip mbstring && \
5+ git clone https://github.com/nikic/php-ast.git /tmp/php-ast && \
86 cd /tmp/php-ast && phpize && ./configure && make install && \
9- echo extension=ast.so > /usr/local/etc/php/conf.d/ast.ini
10-
11- RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin/ --filename=composer
12-
13- RUN set -x \
14- && curl -fSL "https://github.com/krallin/tini/releases/download/v0.5.0/tini" -o /usr/local/bin/tini \
15- && chmod +x /usr/local/bin/tini
16-
17- ENV PHAN_VERSION 0.4
18-
19- RUN git clone https://github.com/etsy/phan /opt/phan && \
20- cd /opt/phan && git checkout $PHAN_VERSION && \
21- cd /opt/phan && composer install
7+ echo extension=ast.so > /usr/local/etc/php/conf.d/ast.ini && \
8+ curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin/ --filename=composer && \
9+ composer create-project --no-dev --prefer-dist etsy/phan /opt/phan 0.4 && \
10+ curl -fSL "https://github.com/krallin/tini/releases/download/v0.9.0/tini-static" -o /usr/local/bin/tini && \
11+ chmod +x /usr/local/bin/tini && \
12+ apk del zlib-dev git && \
13+ rm -rf /var/cache/apk/* /tmp/php-ast /usr/local/bin/composer
2214
2315ENTRYPOINT ["tini" , "/opt/phan/phan" , "--" ]
Original file line number Diff line number Diff line change @@ -5,5 +5,5 @@ This a docker image for [Phan](https://github.com/etsy/phan)
55## Usage
66
77``` bash
8- docker run -v /path/to/php/files/:/scripts/ -w /scripts texthtml/phan -p -3 /scripts/vendor/ $( find /scripts/src/ /scripts/bin/ /scripts/vendor/ -type f -path ' *.php ' )
8+ docker run -v /path/to/php/files/:/scripts/ texthtml/phan -p -3 /scripts/vendor/ --directory /scripts/
99```
You can’t perform that action at this time.
0 commit comments