-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile.template
65 lines (58 loc) · 1.61 KB
/
Dockerfile.template
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
FROM php:%%VARIANT%%
##<debian>##
# hadolint ignore=DL3008
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
git \
# For composer
unzip \
&& rm -rf /var/lib/apt/lists/*
##</debian>##
##<alpine>##
# hadolint ignore=DL3018
RUN apk --no-cache add \
curl \
git \
# For composer
unzip
##</alpine>##
# https://github.com/mlocati/docker-php-extension-installer
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
RUN chmod +x /usr/local/bin/install-php-extensions \
&& install-php-extensions apcu \
bcmath \
gd \
grpc \
imagick \
intl \
##<mcrypt>##
mcrypt \
##</mcrypt>##
memcached \
mongodb \
opcache \
##<opencensus>##
opencensus \
##</opencensus>##
pcntl \
pdo_mysql \
pdo_pgsql \
protobuf \
redis \
soap \
sockets \
xsl \
zip \
&& IPE_DONT_ENABLE=1 install-php-extensions xdebug
RUN echo "date.timezone=UTC" > /usr/local/etc/php/conf.d/timezone.ini \
&& echo "memory_limit=512M" > /usr/local/etc/php/conf.d/memory.ini
ADD https://getcomposer.org/composer-stable.phar /usr/local/bin/composer
RUN chmod +rx /usr/local/bin/composer \
&& composer global config --no-plugins allow-plugins.symfony/flex true \
&& composer global require symfony/flex \
&& rm -rf /home/composer/.composer/cache
##<xdebug-enable>##
RUN docker-php-ext-enable-xdebug
##</xdebug-enable>##
RUN mkdir -p /opt/workspace
WORKDIR /opt/workspace