-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
31 lines (23 loc) · 1.32 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
FROM euskadi31/gentoo-portage:latest
MAINTAINER Axel Etcheverry <[email protected]>
RUN mkdir -p /var/www
RUN mkdir -p /etc/php/fpm.d/
RUN echo "PHP_INI_VERSION=\"production\"" >> /etc/portage/make.conf
RUN echo "dev-lang/php ~amd64" >> /etc/portage/package.keywords
RUN echo "app-admin/eselect-php fpm" >> /etc/portage/package.use
RUN echo "media-libs/gd jpeg png" >> /etc/portage/package.use
RUN echo "dev-lang/php cli crypt ctype curl fileinfo filter fpm gd hash iconv intl ipv6 json mhash mysql mysqli mysqlnd opcache pdo phar posix readline session simplexml sockets ssl tokenizer unicode xml xmlreader xmlwriter zip zlib" >> /etc/portage/package.use
RUN echo "PHP_TARGETS=\"php5-6\"" >> /etc/portage/make.conf
RUN emerge dev-lang/php
RUN sed -i '/\[www\]/,$d' "/etc/php/fpm-php5.6/php-fpm.conf"
RUN echo "include=/etc/php/fpm.d/*.conf" >> "/etc/php/fpm-php5.6/php-fpm.conf"
RUN sed -i 's/;date.timezone =/date.timezone = UTC/' "/etc/php/fpm-php5.6/php.ini"
RUN sed -i 's/;date.timezone =/date.timezone = UTC/' "/etc/php/cli-php5.6/php.ini"
# forward logs to docker log collector
RUN ln -sf /dev/stdout /var/log/php-fpm.log
RUN ln -sf /dev/stderr /var/log/fpm-php.www.log
COPY www.conf /etc/php/fpm.d/www.conf
#VOLUME /var/www
#WORKDIR /var/www
EXPOSE 9000
CMD ["php-fpm", "-y", "/etc/php/fpm-php5.6/php-fpm.conf", "--nodaemonize"]