-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
51 lines (39 loc) · 1.51 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
41
42
43
44
45
46
47
48
49
50
51
FROM php:7.2-fpm-alpine3.8
LABEL maintainer "https://github.com/hurtom/"
RUN curl -L https://getcomposer.org/installer -o composer-setup.php \
&& php composer-setup.php --install-dir=/usr/local/bin --filename=composer \
&& rm -f composer-setup.php
RUN apk add --no-cache --virtual .build-deps \
$PHPIZE_DEPS \
freetype-dev \
gettext-dev \
libjpeg-turbo-dev \
libpng-dev \
zlib-dev \
&& pecl install redis xdebug \
&& docker-php-ext-enable redis xdebug \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install bcmath gd gettext mysqli opcache pdo_mysql zip \
&& apk del .build-deps
RUN apk add --no-cache \
ca-certificates \
freetype \
git \
libjpeg-turbo \
libintl \
libpng \
tzdata \
unzip \
nginx \
runit
RUN cp /usr/share/zoneinfo/Europe/Kiev /etc/localtime \
&& echo "Europe/Kiev" > /etc/timezone
RUN sed -ri 's/^www-data:x:82:82:/www-data:x:1000:1000:/' /etc/passwd
RUN sed -ri '/^access.log/ s/^/; /' /usr/local/etc/php-fpm.d/docker.conf \
&& sed -ri "s/^pm = dynamic/pm = ondemand/" /usr/local/etc/php-fpm.d/www.conf
RUN ln -sf /dev/stdout /var/log/nginx/access.log \
&& ln -sf /dev/stderr /var/log/nginx/error.log
EXPOSE 80
COPY runit /etc/runit
RUN find /etc/runit -type f -exec chmod +x {} \;
CMD ["runsvdir", "/etc/runit"]