-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
33 lines (25 loc) · 1.24 KB
/
Dockerfile
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
FROM php:7.1-fpm-alpine
# Make debugging easier
RUN pecl install xdebug-2.5.0
RUN set -xe \
&& pkgs="freetype libpng libjpeg-turbo freetype-dev libpng-dev libjpeg-turbo-dev \
libmcrypt-dev \
postgresql-dev" \
&& apk add --no-cache $pkgs \
--repository="http://nl.alpinelinux.org/alpine/edge/testing" \
--repository="http://nl.alpinelinux.org/alpine/edge/community" \
--allow-untrusted
RUN set -xe \
&& docker-php-ext-configure gd \
--with-jpeg-dir=/usr/include/ \
--with-png-dir=/usr/include/ \
--with-freetype-dir=/usr/include/
RUN set -xe \
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd iconv mcrypt exif pgsql pdo_pgsql mysqli
# We need composer
RUN set -xe \
&& php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
&& php -r "if (hash_file('SHA384', 'composer-setup.php') === trim(file_get_contents('https://composer.github.io/installer.sig'))) { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" \
&& php composer-setup.php --install-dir=/bin --filename=composer && rm composer-setup.php
VOLUME ["/var/app"]
# docker build --rm --tag php-essentials-v2:7.1-fpm-alpine --file Dockerfile .