-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-debian.template
50 lines (46 loc) · 1.35 KB
/
Dockerfile-debian.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
FROM php:%%PHP_SUITE%%
RUN set -xe \
&& provides () { apt-cache showpkg $1 | awk '/Pa/, /Reverse P/ {next} {print $1 | "sort"}' | uniq;} \
&& search_deps () { apt-cache depends $1 | awk '$1 == "Depends:" && $2 ~ "'"$2"'" {print $2 | "sort"}' | uniq | head -n 1;} \
&& apt-get update \
&& libDeps=" \
libfreetype6 \
$(search_deps 'libicu-dev' '^libicu') \
$(search_deps "$(provides libpng-dev)" '^libpng') \
libjpeg62-turbo \
libmcrypt4 \
$(search_deps 'libxslt1-dev' '^libxslt') \
" \
&& apt-get install -y $libDeps --no-install-recommends && rm -r /var/lib/apt/lists/*
##<autogenerated>##
##</autogenerated>##
RUN set -xe \
&& buildDeps=" \
libfreetype6-dev \
libicu-dev \
libpng-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libxslt1-dev \
" \
&& apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ --with-png-dir=/usr/include/ \
&& docker-php-ext-install \
bcmath \
dom \
gd \
intl \
mcrypt \
pdo_mysql \
xsl \
zip \
soap \
&& docker-php-source delete \
\
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $buildDeps \
\
&& pecl update-channels \
&& rm -rf /tmp/pear ~/.pearrc \
&& true # Done
##<autogenerated>##
##</autogenerated>##