-
Notifications
You must be signed in to change notification settings - Fork 1
/
app.dockerfile
61 lines (51 loc) · 1.28 KB
/
app.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
FROM php:7.3-fpm-alpine
# Add build dependencies
RUN apk add --no-cache --virtual .build-deps \
zlib-dev \
libjpeg-turbo-dev \
libpng-dev \
libxml2-dev \
bzip2-dev \
autoconf \
openssl-dev \
build-base
# Add production dependencies
RUN apk add --update --no-cache \
jpegoptim \
pngquant \
optipng \
icu-dev \
freetype-dev \
nginx \
supervisor
RUN pecl install mongodb \
&& docker-php-ext-enable mongodb
# Install the required extensions
RUN docker-php-ext-configure \
opcache --enable-opcache &&\
docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ &&\
docker-php-ext-install \
opcache \
mysqli \
pdo \
pdo_mysql \
sockets \
json \
intl \
gd \
xml \
bz2 \
pcntl \
bcmath
RUN apk add --no-cache libzip-dev && docker-php-ext-install zip
# Add composer globally
RUN curl -s https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin/ --filename=composer
ENV COMPOSER_ALLOW_SUPERUSER=1
ENV PATH="./vendor/bin:$PATH"
COPY master.ini /etc/supervisor.d/
COPY default.conf /etc/nginx/conf.d/
# Remove build dependencies for a slim final image
RUN apk del -f .build-deps
# Setup workdir
WORKDIR /var/www
CMD ["/usr/bin/supervisord"]