-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
103 lines (73 loc) · 1.98 KB
/
Copy pathDockerfile
File metadata and controls
103 lines (73 loc) · 1.98 KB
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
ARG VERSION
FROM php:$VERSION as light
RUN echo 'Acquire::http::Timeout "10";' >> /etc/apt/apt.conf.d/80-custom-options
RUN echo 'Acquire::Retries "5";' >> /etc/apt/apt.conf.d/80-custom-options
RUN echo 'APT::Install-Recommends "false";' >> /etc/apt/apt.conf.d/80-custom-options
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get clean && apt-get update --fix-missing
RUN apt-get install --fix-missing -y apt-utils
RUN apt-get upgrade -y
RUN apt-get install --fix-missing -y \
curl wget git zip unzip g++ \
libzip-dev libicu-dev libssl-dev
RUN pecl install protobuf
RUN pecl install mongodb
RUN pecl install apcu
RUN docker-php-ext-install \
bcmath \
calendar \
intl \
opcache \
zip
##
# Common Apache config
##
COPY ./apache /etc/apache2/sites-available/000-default.conf
RUN sed -i 's/80/${PORT}/g' /etc/apache2/ports.conf && \
cp "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" && \
a2enmod rewrite headers mime
RUN useradd -u 1000 -g www-data -m -s /bin/bash developer
COPY ./composer-installer.sh /var/www/
RUN chown www-data:www-data /var/www
WORKDIR /var/www/html
ENV PORT=80
##
# END Common Apache config
##
RUN apt-get clean --dry-run
FROM light as standard
RUN apt-get install --fix-missing -y \
libbz2-dev libpq-dev \
libpng-dev libwebp-dev libjpeg62-turbo-dev
RUN pecl install grpc
RUN pecl install redis
RUN docker-php-ext-configure gd --with-webp --with-jpeg \
&& docker-php-ext-install -j$(nproc) gd
RUN docker-php-ext-install \
bz2 \
pdo_pgsql \
pdo_mysql
FROM standard as full
RUN apt-get install --fix-missing -y \
procps pkg-config \
libc-dev zlib1g-dev libgmp-dev \
libldb-dev libldap2-dev libmemcached-dev libtidy-dev libxslt-dev libmagickwand-dev
RUN pecl install memcached
RUN pecl install imagick
#RUN pecl install opencensus
RUN docker-php-ext-install \
dba \
gettext \
gmp \
ldap \
mysqli \
pcntl \
pgsql \
shmop \
soap \
sockets \
sysvshm \
tidy \
xsl
# RUN docker-php-ext-install xmlrpc
# RUN pecl install stackdriver_debugger-0.2.0