-
Notifications
You must be signed in to change notification settings - Fork 8
/
Dockerfile
40 lines (29 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
FROM php:7.1-fpm-alpine
ENV WORKDIR "/var/www/app"
RUN apk upgrade --update && apk --no-cache add \
git autoconf tzdata openntpd libcurl curl-dev coreutils \
libmcrypt-dev freetype-dev libxpm-dev libjpeg-turbo-dev libvpx-dev \
libpng-dev libressl libressl-dev libxml2-dev postgresql-dev icu-dev \
yarn
RUN docker-php-ext-configure intl \
&& docker-php-ext-configure opcache \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ \
--with-jpeg-dir=/usr/include/ --with-png-dir=/usr/include/ \
--with-xpm-dir=/usr/include/
RUN docker-php-ext-install -j$(nproc) gd iconv pdo pdo_mysql pdo_pgsql curl \
bcmath mcrypt mbstring json xml xmlrpc zip intl opcache
# Add timezone
RUN ln -s /usr/share/zoneinfo/UTC /etc/localtime && \
"date"
# Install composer
RUN curl -sS https://getcomposer.org/installer | \
php -- --install-dir=/usr/local/bin --filename=composer
# Cleanup
RUN rm -rf /var/cache/apk/* \
&& find / -type f -iname \*.apk-new -delete \
&& rm -rf /var/cache/apk/*
RUN mkdir -p ${WORKDIR}
RUN chown www-data:www-data -R ${WORKDIR}
WORKDIR ${WORKDIR}
EXPOSE 9000
CMD ["php-fpm"]