Skip to content
Snippets Groups Projects
Dockerfile 667 B
Newer Older
FROM indiepaas/nginx-php
Pierre Ozoux's avatar
Pierre Ozoux committed

RUN apt-get update && apt-get install -y \
      php5-gd \
      php5-geoip \
      php5-cli \
Pierre Ozoux's avatar
Pierre Ozoux committed
      zip \
Pierre Ozoux's avatar
Pierre Ozoux committed
      php-apc && \
    rm -rf /var/lib/apt/lists/* && \
Pierre Ozoux's avatar
Pierre Ozoux committed
    curl -O "http://builds.piwik.org/piwik.zip" && \
    unzip piwik.zip && \
Pierre Ozoux's avatar
Pierre Ozoux committed
    mv /piwik/config /piwik-config && \
    sed -i 's/# exec CMD/# exec CMD\n\/opt\/startup-piwik.sh/g' /opt/entrypoint.sh

# install nginx piwik config
ADD nginx-piwik.conf /etc/nginx/conf.d/nginx-piwik.conf

# add startup.sh
ADD startup-piwik.sh /opt/startup-piwik.sh
RUN chmod a+x /opt/startup-piwik.sh

# Expose environment variables
ENV DB_NAME piwik
ENV DB_USER admin

VOLUME "/piwik/config/"