File tree Expand file tree Collapse file tree 1 file changed +17
-47
lines changed Expand file tree Collapse file tree 1 file changed +17
-47
lines changed Original file line number Diff line number Diff line change 1- FROM php:alpine
1+ ARG PHP_VERSION=7.4
22
3- ENV COMPOSER_ALLOW_SUPERUSER=1 \
4- PATH="./vendor/bin:$PATH"
3+ FROM php:$PHP_VERSION-alpine
54
65RUN apk add --update --no-cache \
7- bash \
8- openssh-client \
9- rsync
6+ bash openssh-client rsync
107
11- RUN apk add --update --no-cache -t .persistent-deps \
12- # for bz2 extension
13- bzip2-dev \
14- # for gd --with-freetype-dir option
15- freetype-dev \
16- # for gmp extension
17- gmp-dev \
18- # for gd --with-jpeg-dir option
19- libjpeg-turbo-dev \
20- # for gd --with-png-dir option
21- libpng-dev \
22- # for zip extension
23- libzip-dev \
24- # Environment
25- && set -xe \
26- # Configure
27- && docker-php-ext-configure gd \
28- --with-freetype-dir=/usr/include \
29- --with-jpeg-dir=/usr/include \
30- --with-png-dir=/usr/include \
31- && docker-php-ext-configure zip \
32- --with-libzip \
33- && docker-php-ext-install \
34- bcmath \
35- bz2 \
36- exif \
37- gd \
38- gmp \
39- pdo_mysql \
40- zip \
41- # Composer
42- && php -r "readfile('http://getcomposer.org/installer');" | php -- --install-dir=/usr/local/bin --filename=composer \
43- # Cleanup
44- && apk del --no-cache \
45- freetype-dev \
46- libjpeg-turbo-dev \
47- libpng-dev \
48- && rm -rf \
49- /tmp/* \
50- /var/cache/apk/* \
51- /var/tmp/*
8+ ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
9+
10+ RUN chmod +x /usr/local/bin/install-php-extensions && \
11+ install-php-extensions \
12+ @composer \
13+ bcmath-$PHP_VERSION \
14+ bz2-$PHP_VERSION \
15+ exif-$PHP_VERSION \
16+ gd-$PHP_VERSION \
17+ gmp-$PHP_VERSION \
18+ pdo_mysql-$PHP_VERSION \
19+ zip-$PHP_VERSION
20+
21+ RUN rm -rf /tmp/* /var/cache/apk/* /var/tmp/*
5222
5323WORKDIR /var/www
You can’t perform that action at this time.
0 commit comments