-
Notifications
You must be signed in to change notification settings - Fork 27
/
Dockerfile
47 lines (40 loc) · 1.13 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
FROM totara/docker-dev-php-base:latest
# This is the PHP version we want to install
ENV PHPVERSION 5.5.38
# Install php version with desired extensions
RUN phpbrew install -j $(nproc) $PHPVERSION \
+default \
+fpm \
+iconv \
+intl \
+mysql \
+pcntl \
+pdo \
+pgsql \
+soap \
+sqlite \
+xmlrpc \
+zlib \
+exif \
-- \
--enable-gd-native-ttf \
--with-fpm-group=www-data \
--with-fpm-user=www-data \
--with-freetype-dir \
--with-gd \
--with-jpeg-dir=/usr \
--with-libdir=/lib/x86_64-linux-gnu \
--with-mssql \
--with-png-dir=/usr
RUN phpbrew clean php-$PHPVERSION
ENV PHPBREW_PHP php-$PHPVERSION
# Copy custom config file contents
RUN mkdir -p /root/.phpbrew/php/php-$PHPVERSION/etc/fpm.d
COPY config/freetds.conf /etc/freetds/freetds.conf
COPY config/php-fpm.conf /root/.phpbrew/php/php-$PHPVERSION/etc/php-fpm.conf
COPY config/php.ini /tmp/php.ini
# We just append additional php.ini vars
RUN cat /tmp/php.ini >> /root/.phpbrew/php/php-$PHPVERSION/etc/php.ini
# Set PATH to phpbrew bin folder
ENV PATH /root/.phpbrew/php/php-$PHPVERSION/bin:$PATH
EXPOSE 9000