File tree Expand file tree Collapse file tree 1 file changed +10
-34
lines changed Expand file tree Collapse file tree 1 file changed +10
-34
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,10 @@ ENV APP_ENV=prod
22
22
23
23
WORKDIR /srv/app
24
24
25
+ # php extensions installer: https://github.com/mlocati/docker-php-extension-installer
26
+ ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
27
+ RUN chmod +x /usr/local/bin/install-php-extensions
28
+
25
29
# persistent / runtime deps
26
30
RUN apk add --no-cache \
27
31
acl \
@@ -32,37 +36,12 @@ RUN apk add --no-cache \
32
36
;
33
37
34
38
RUN set -eux; \
35
- apk add --no-cache --virtual .build-deps \
36
- $PHPIZE_DEPS \
37
- icu-data-full \
38
- icu-dev \
39
- libzip-dev \
40
- zlib-dev \
41
- ; \
42
- \
43
- docker-php-ext-configure zip; \
44
- docker-php-ext-install -j$(nproc) \
45
- intl \
46
- zip \
47
- ; \
48
- pecl install \
49
- apcu \
50
- ; \
51
- pecl clear-cache; \
52
- docker-php-ext-enable \
53
- apcu \
39
+ install-php-extensions \
40
+ intl \
41
+ zip \
42
+ apcu \
54
43
opcache \
55
- ; \
56
- \
57
- runDeps="$( \
58
- scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \
59
- | tr ',' '\n ' \
60
- | sort -u \
61
- | awk 'system(" [ -e /usr/local/lib/" $1 " ]") == 0 { next } { print " so:" $1 }' \
62
- )" ; \
63
- apk add --no-cache --virtual .app-phpexts-rundeps $runDeps; \
64
- \
65
- apk del .build-deps
44
+ ;
66
45
67
46
# ##> recipes ###
68
47
# ##< recipes ###
@@ -125,10 +104,7 @@ RUN rm $PHP_INI_DIR/conf.d/app.prod.ini; \
125
104
COPY docker/php/conf.d/app.dev.ini $PHP_INI_DIR/conf.d/
126
105
127
106
RUN set -eux; \
128
- apk add --no-cache --virtual .build-deps $PHPIZE_DEPS; \
129
- pecl install xdebug; \
130
- docker-php-ext-enable xdebug; \
131
- apk del .build-deps
107
+ install-php-extensions xdebug
132
108
133
109
RUN rm -f .env.local.php
134
110
You can’t perform that action at this time.
0 commit comments