dockerfiles/piwik/Dockerfile

68 lines
2.1 KiB
Docker
Raw Normal View History

2016-05-01 16:29:24 +02:00
FROM alpine:edge
2016-04-11 15:59:32 +02:00
MAINTAINER Wonderfall <wonderfall@mondedie.fr>
2016-04-11 16:21:42 +02:00
ARG VERSION=2.16.1
ENV GID=991 UID=991
2016-04-11 15:59:32 +02:00
RUN echo "@testing http://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
&& echo "@commuedge http://nl.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \
&& apk -U add \
nginx \
supervisor \
2016-05-01 16:29:24 +02:00
libwebp \
git \
autoconf \
build-base \
geoip \
geoip-dev \
2016-04-11 15:59:32 +02:00
tini@commuedge \
2016-05-01 16:29:24 +02:00
php7-fpm@testing \
php7-gd@testing \
php7-curl@testing \
php7-session@testing \
php7-json@testing \
php7-ctype@testing \
php7-mbstring@testing \
php7-iconv@testing \
php7-zlib@testing \
php7-dom@testing \
php7-openssl@testing \
php7-mysqli@testing \
php7-pdo_mysql@testing \
php7-dev@testing \
php7-pear@testing \
&& cd /tmp && git clone https://github.com/Zakay/geoip && cd geoip \
&& phpize7 && ./configure --with-php-config=/usr/bin/php-config7 && make && make install \
2016-05-01 16:41:22 +02:00
&& echo 'extension=geoip.so' >> /etc/php7/conf.d/00_geoip.ini \
2016-05-01 16:29:24 +02:00
&& echo 'geoip.custom_directory=/piwik/misc' >> /etc/php7/php.ini \
&& apk del git autoconf build-base php7-dev php7-pear geoip-dev \
&& rm -rf /var/cache/apk/* /tmp/*
2016-05-01 17:10:03 +02:00
RUN apk -U add openssl ca-certificates \
&& wget -qO- http://builds.piwik.org/piwik-$VERSION.tar.gz | tar xz \
2016-05-01 16:29:24 +02:00
&& wget -q http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz -P /piwik/misc \
2016-04-11 15:59:32 +02:00
&& gzip -d /piwik/misc/GeoLiteCity.dat.gz \
2016-05-01 17:10:03 +02:00
&& mv /piwik/misc/GeoLiteCity.dat /piwik/misc/GeoIPCity.dat \
&& cd /piwik/libs/MaxMindGeoIP && rm geoip.inc \
&& wget -q https://raw.githubusercontent.com/cerlestes/piwik/cerlestes-patch-1/libs/MaxMindGeoIP/geoip.inc \
&& chmod +x geoip.inc \
&& apk del openssl ca-certificates \
&& rm -f /var/cache/apk/*
2016-04-11 15:59:32 +02:00
COPY nginx.conf /etc/nginx/nginx.conf
2016-05-01 16:29:24 +02:00
COPY php-fpm.conf /etc/php7/php-fpm.conf
2016-04-11 15:59:32 +02:00
COPY supervisord.conf /usr/local/etc/supervisord.conf
COPY run.sh /usr/local/bin/run.sh
RUN chmod +x /usr/local/bin/run.sh
VOLUME /config
EXPOSE 80
LABEL description "Open web analytics platform" \
2016-04-11 16:21:42 +02:00
piwik "Piwik v$VERSION"
2016-04-11 15:59:32 +02:00
CMD ["tini","--","run.sh"]
2016-05-01 16:29:24 +02:00