-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile-alpine.template
67 lines (62 loc) · 1.5 KB
/
Dockerfile-alpine.template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
%%HEAD%%
# entrypoint.sh dependencies
RUN set -ex; \
\
apk add --no-cache \
bash \
coreutils
# Install required PHP extensions
RUN set -ex; \
\
apk add --no-cache --virtual .build-deps \
$PHPIZE_DEPS \
icu-dev \
zlib-dev \
libzip-dev \
postgresql-dev \
sqlite-dev \
libxml2-dev \
freetype-dev \
libmemcached-dev \
; \
\
docker-php-ext-configure intl; \
docker-php-ext-install -j "$(nproc)" \
intl \
zip \
pdo_mysql \
mysqli \
pdo_pgsql \
pdo_sqlite \
; \
# pecl will claim success even if one install fails, so we need to perform each install separately
pecl install APCu-%%APCU_VERSION%%; \
pecl install memcached-%%MEMCACHED_VERSION%%; \
pecl install redis-%%REDIS_VERSION%%; \
\
docker-php-ext-enable \
apcu \
memcached \
redis \
; \
\
runDeps="$( \
scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \
| tr ',' '\n' \
| sort -u \
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
)"; \
apk add --no-network --virtual .officelife-phpext-rundeps $runDeps; \
apk del --no-network .build-deps
%%EXTRA_INSTALL%%
RUN set -ex; \
apk add --no-cache --virtual .fetch-deps \
bzip2 \
gnupg \
; \
\
%%INSTALL%% \
%%POSTINSTALL%% \
\
apk del .fetch-deps
%%FOOT%%