-
Notifications
You must be signed in to change notification settings - Fork 41
/
Copy pathDockerfile_php
59 lines (56 loc) · 2.04 KB
/
Dockerfile_php
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
FROM php:7.1-fpm-alpine
#As GraphicsMagick is not available in Alpine 3.4, we install it manually
#Credits to https://hub.docker.com/r/rafakato/alpine-graphicsmagick/~/dockerfile/
ENV PKGNAME=graphicsmagick
ENV PKGVER=1.3.25
ENV PKGSOURCE=http://downloads.sourceforge.net/$PKGNAME/$PKGNAME/$PKGVER/GraphicsMagick-$PKGVER.tar.lz
# RUN apk add --update graphicsmagick --update-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ --allow-untrusted
#
# Installing graphicsmagick dependencies
RUN cd / && \
apk add --update g++ \
gcc \
make \
lzip \
wget \
libjpeg-turbo-dev \
libpng-dev \
libtool \
libgomp && \
wget $PKGSOURCE && \
lzip -d -c GraphicsMagick-$PKGVER.tar.lz | tar -xvf - && \
cd GraphicsMagick-$PKGVER && \
./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--localstatedir=/var \
--enable-shared \
--disable-static \
--with-modules \
--with-threads \
--with-gs-font-dir=/usr/share/fonts/Type1 \
--with-quantum-depth=16 && \
make && \
make install && \
cd / && \
rm -rf GraphicsMagick-$PKGVER && \
rm GraphicsMagick-$PKGVER.tar.lz && \
apk del g++ \
gcc \
make \
lzip \
wget
RUN cd /tmp \
&& mkdir "/tmp/php-sessions" \
&& chown -R www-data:www-data "/tmp/php-sessions" \
&& apk add --no-cache zlib-dev libexif-dev autoconf autoconf gcc g++ libtool make \
&& docker-php-ext-install opcache pdo pdo_mysql zip exif \
&& echo "\n" | pecl install gmagick-2.0.4RC1 \
&& docker-php-ext-enable gmagick \
&& apk del autoconf g++ make \
&& curl https://raw.githubusercontent.com/composer/getcomposer.org/1b137f8bf6db3e79a38a5bc45324414a6b1f9df2/web/installer | php -- --quiet \
&& mv composer.phar /usr/local/bin/composer