Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
mathroc committed Apr 9, 2016
2 parents 4d98d2a + 4bced4e commit 175e7cb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 20 deletions.
30 changes: 11 additions & 19 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,15 @@
FROM php:7
FROM php:7.0-alpine

RUN apt-get update
RUN apt-get install -y zlib1g-dev git libzmq3 libzmq3-dev
RUN docker-php-ext-install zip mbstring

RUN git clone https://github.com/nikic/php-ast.git /tmp/php-ast && \
RUN apk --update add zlib-dev git && \
docker-php-ext-install zip mbstring && \
git clone https://github.com/nikic/php-ast.git /tmp/php-ast && \
cd /tmp/php-ast && phpize && ./configure && make install && \
echo extension=ast.so > /usr/local/etc/php/conf.d/ast.ini

RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin/ --filename=composer

RUN set -x \
&& curl -fSL "https://github.com/krallin/tini/releases/download/v0.5.0/tini" -o /usr/local/bin/tini \
&& chmod +x /usr/local/bin/tini

ENV PHAN_VERSION 0.4

RUN git clone https://github.com/etsy/phan /opt/phan && \
cd /opt/phan && git checkout $PHAN_VERSION && \
cd /opt/phan && composer install
echo extension=ast.so > /usr/local/etc/php/conf.d/ast.ini && \
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin/ --filename=composer && \
composer create-project --no-dev --prefer-dist etsy/phan /opt/phan 0.4 && \
curl -fSL "https://github.com/krallin/tini/releases/download/v0.9.0/tini-static" -o /usr/local/bin/tini && \
chmod +x /usr/local/bin/tini && \
apk del zlib-dev git && \
rm -rf /var/cache/apk/* /tmp/php-ast /usr/local/bin/composer

ENTRYPOINT ["tini", "/opt/phan/phan", "--"]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ This a docker image for [Phan](https://github.com/etsy/phan)
## Usage

```bash
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')
docker run -v /path/to/php/files/:/scripts/ texthtml/phan -p -3 /scripts/vendor/ --directory /scripts/
```

0 comments on commit 175e7cb

Please sign in to comment.