-
Notifications
You must be signed in to change notification settings - Fork 91
/
Dockerfile
51 lines (41 loc) · 1.79 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
FROM php:7.2-fpm-alpine
# install git for computing diffs
RUN apk add --update git
# install Composer
COPY docker-install-composer /usr/local/bin/docker-install-composer
RUN chmod +x /usr/local/bin/docker-install-composer && docker-install-composer
# libpng-dev needed by "gd" extension
# icu-dev needed by "intl" extension
# postgresql-dev needed by "pgsql" extension
# libzip-dev needed by "zip" extension
# autoconf needed by "redis" extension
RUN apk add --update \
libpng-dev \
icu-dev \
postgresql-dev \
libzip-dev \
autoconf
# "zip" extension warns about deprecation if we do not use a system library
RUN docker-php-ext-configure zip --with-libzip
# install necessary PHP extensions requested by Composer
RUN docker-php-ext-install \
bcmath \
gd \
intl \
opcache \
pgsql \
pdo_pgsql \
zip
# redis PHP extension is not provided with the PHP source and must be installed via PECL, build-base used only for installation
RUN apk add --update build-base && pecl install redis-4.0.2 && docker-php-ext-enable redis && apk del build-base
# install npm
RUN apk add --update nodejs-npm
# install grunt-cli using npm to be able to run grunt watch
RUN npm install -g grunt-cli
# install postgresql to allow execution of pg_dump for acceptance tests (using older repository to install version 9.5)
RUN apk add --update --no-cache --repository https://dl-3.alpinelinux.org/alpine/v3.4/main "postgresql<9.6"
# install locales and switch to en_US.utf8 in order to enable UTF-8 support
# see https://github.com/docker-library/php/issues/240#issuecomment-305038173
RUN apk add --update --no-cache --repository https://dl-3.alpinelinux.org/alpine/edge/testing gnu-libiconv
ENV LD_PRELOAD /usr/lib/preloadable_libiconv.so php
ENV LC_ALL=en_US.utf8 LANG=en_US.utf8 LANGUAGE=en_US.utf8