Skip to content
This repository was archived by the owner on Nov 26, 2025. It is now read-only.

Commit 4bced4e

Browse files
committed
Merge pull request #2 from mathroc/feature/alpine
use php:7.0-alpine image
2 parents 5b48bfa + 020d467 commit 4bced4e

1 file changed

Lines changed: 11 additions & 17 deletions

File tree

Dockerfile

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,15 @@
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-
RUN git clone https://github.com/etsy/phan /opt/phan
18-
19-
RUN 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 dev-master && \
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
2014

2115
ENTRYPOINT ["tini", "/opt/phan/phan", "--"]

0 commit comments

Comments
 (0)