forked from crunchbutton/crunchbutton
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
52 lines (42 loc) · 1.73 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
52
FROM php:7.0-fpm
ENV DOCKER=1
EXPOSE 80
RUN apt-get update && apt-get install -y \
libmcrypt-dev \
php-pear \
curl \
git \
nginx \
zlib1g-dev \
&& docker-php-ext-install iconv mcrypt \
&& docker-php-ext-install pdo pdo_mysql \
&& docker-php-ext-install mbstring \
&& docker-php-ext-install zip
# https://github.com/docker-library/php/issues/262#issuecomment-233109231
# RUN docker-php-source extract \
# && curl -L -o /tmp/redis.tar.gz https://github.com/phpredis/phpredis/archive/3.0.0.tar.gz \
# && tar xfz /tmp/redis.tar.gz \
# && rm -r /tmp/redis.tar.gz \
# && mv phpredis-3.0.0 /usr/src/php/ext/redis \
# && sed -i '$ a redis' /usr/src/php-available-exts \
# && docker-php-ext-install redis # \
# && docker-php-source delete
ADD conf/nginx.docker.conf /etc/nginx/sites-available/default
RUN echo "cgi.fix_pathinfo = 0;" >> /usr/local/etc/php/conf.d/fix_pathinfo.ini
#RUN echo "listen = /var/run/php5-fpm.sock" >> /usr/local/etc/php-fpm.conf
RUN echo " \n\
listen = 127.0.0.1:9000" >> /usr/local/etc/php-fpm.conf
ADD ./ /app
RUN php --ini
RUN cd /app && curl -sS https://getcomposer.org/installer | php
RUN cd /app && php composer.phar install --no-dev --optimize-autoloader --prefer-dist
#RUN mkdir /app/cache/data && chmod 0777 /app/cache/data
#RUN mkdir /app/cache/min && chmod 0777 /app/cache/min
RUN mkdir /tmp/data && chmod 0777 /tmp/data
RUN mkdir /tmp/min && chmod 0777 /tmp/min
# twilio ssl fix
ADD ssl/twilio.der.crt /usr/local/share/ca-certificates/twilio.der.crt
RUN chmod 0644 /usr/local/share/ca-certificates/twilio.der.crt
RUN chown root.root /usr/local/share/ca-certificates/twilio.der.crt
RUN /usr/sbin/update-ca-certificates
CMD /app/cli/build.sh && nginx && php-fpm