forked from spryker/docker-shop-suite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.build
110 lines (97 loc) · 3.23 KB
/
Dockerfile.build
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# docker build -t spryker/dockertestphp71 -f Dockerfile .
FROM php:7.1.5-fpm
LABEL authors="Marek Obuchowicz <[email protected]>,Vladimir Voronin <[email protected]>"
# For running APT in non-interactive mode
ENV DEBIAN_FRONTEND noninteractive
# Define build requirements, which can be removed after setup from the container
ENV PHPIZE_DEPS \
autoconf \
build-essential \
file \
g++-4.9 \
gcc-4.9 \
libbz2-dev \
libc-client-dev \
libc-dev \
libcurl4-gnutls-dev \
libedit-dev \
libfreetype6-dev \
libgmp-dev \
libicu-dev \
libjpeg62-turbo-dev \
libkrb5-dev \
libmcrypt-dev \
libpng12-dev \
libpq-dev \
libsqlite3-dev \
libssh2-1-dev \
libxml2-dev \
libxslt1-dev \
make \
pkg-config \
re2c
# Set Debian sources
RUN \
apt-get update && apt-get install -q -y --no-install-recommends wget apt-transport-https && \
echo "deb http://ftp.de.debian.org/debian/ jessie main non-free contrib\n" > /etc/apt/sources.list.d/debian.list && \
echo "deb-src http://ftp.de.debian.org/debian/ jessie main non-free contrib\n" >> /etc/apt/sources.list.d/debian.list && \
echo "deb https://deb.nodesource.com/node_6.x jessie main" > /etc/apt/sources.list.d/node.list && \
wget --quiet -O - https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
# Install Debian packages
RUN \
apt-get -qy update && apt-get install -q -y --no-install-recommends $PHPIZE_DEPS \
apt-utils \
ca-certificates \
curl \
debconf \
debconf-utils \
git \
git-core \
graphviz \
libedit2 \
libmysqlclient18 \
libpq5 \
libsqlite3-0 \
libssh2-php \
netcat \
nodejs \
patch \
postgresql-client \
unzip \
wget \
zip \
# Install PHP extensions
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql \
&& docker-php-ext-install -j$(nproc) \
bcmath \
bz2 \
gd \
gmp \
iconv \
intl \
mbstring \
mcrypt \
mysqli \
pdo \
pdo_mysql \
pdo_pgsql \
pgsql \
readline \
soap \
xmlrpc \
xsl \
zip \
# Install PHP redis extension
&& pecl install -o -f redis \
&& rm -rf /tmp/pear \
&& echo "extension=redis.so" > $PHP_INI_DIR/conf.d/docker-php-ext-redis.ini \
# Install composer
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer \
# Remove build requirements for php modules
&& apt-get -qy autoremove \
&& apt-get -qy purge $PHPIZE_DEPS \
&& rm -rf /var/lib/apt/lists/*
RUN install -d -o www-data -g www-data -m 0755 /data /var/www
WORKDIR /data
CMD ["/bin/bash"]