forked from ekreative/php-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.template
64 lines (57 loc) · 1.4 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
FROM php:%%VARIANT%%
##<debian>##
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
git \
# For composer
unzip \
&& rm -rf /var/lib/apt/lists/*
##</debian>##
##<alpine>##
RUN apk --no-cache add \
curl \
git \
# For composer
unzip
##</alpine>##
# https://github.com/mlocati/docker-php-extension-installer
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/bin/
RUN 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
RUN echo "date.timezone=UTC" > /usr/local/etc/php/conf.d/timezone.ini
RUN 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
RUN composer global require symfony/flex \
&& rm -rf /home/composer/.composer/cache
##<xdebug>##
RUN pecl install -o -f xdebug \
&& rm -rf /tmp/pear
##<xdebug-enable>##
RUN docker-php-ext-enable xdebug
##</xdebug-enable>##
##</xdebug>##
RUN mkdir -p /opt/workspace
WORKDIR /opt/workspace