summaryrefslogtreecommitdiffstats
path: root/Services/php/Dockerfile
blob: 7cb96b51de3d20efcde7c0febf9cc2dd08ede2b3 (plain)
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 startx/sv-apache
MAINTAINER Christophe LARUE <dev@startx.fr>

USER root
RUN dnf -y install php php-pecl-mongo php-cli php-pear \
        php-gd php-mcrypt php-mysqlnd php-soap php-pecl-xdebug \
        php-pdo php-process php-common php-mbstring \
        php-bcmath php-pecl-zip php-php-gettext php-tcpdf \
        php-tcpdf-dejavu-sans-fonts php-tidy \
    && dnf clean all  
ENV LOG_PATH=/data/logs/apache_php  \
    APP_PATH=/data/apache_php \
    STARTUPLOG=/data/logs/apache_php/startup.log \
    TMP_APP_PATH=/tmp/apache
COPY httpd.conf $HTTPDCONF
COPY php.ini /etc/php.d/sx.ini
COPY run.sh /bin/
RUN chmod 775 /bin/run.sh && \
    chmod ug+r $HTTPDCONF && \
    mkdir -p $TMP_APP_PATH && \
    mkdir -p $APP_PATH && \
    mkdir -p $LOG_PATH && \
    touch $STARTUPLOG
COPY ./ $TMP_APP_PATH
RUN rm -f $TMP_APP_PATH/Dockerfile $TMP_APP_PATH/httpd.conf $TMP_APP_PATH/run.sh && \
    chown -R apache:apache $TMP_APP_PATH $APP_PATH $LOG_PATH && \
    chmod ug+r -R $TMP_APP_PATH $APP_PATH

EXPOSE 80 443
VOLUME [$APP_PATH,$LOG_PATH]
CMD ["/bin/run.sh"]