This repository has been archived by the owner on Feb 11, 2024. It is now read-only.
forked from matomo-org/docker
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e96a89c
commit 5c658b8
Showing
7 changed files
with
190 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
FROM php:7.1-%%VARIANT%% | ||
|
||
LABEL maintainer="[email protected]" | ||
|
||
RUN set -ex; \ | ||
\ | ||
apk add --no-cache --virtual .build-deps \ | ||
alpine-sdk \ | ||
autoconf \ | ||
freetype-dev \ | ||
geoip-dev \ | ||
icu-dev \ | ||
libjpeg-turbo-dev \ | ||
libpng-dev \ | ||
openldap-dev \ | ||
pcre-dev \ | ||
; \ | ||
\ | ||
docker-php-ext-configure gd --with-freetype-dir=/usr --with-png-dir=/usr --with-jpeg-dir=/usr; \ | ||
docker-php-ext-configure ldap; \ | ||
docker-php-ext-install \ | ||
gd \ | ||
ldap \ | ||
mysqli \ | ||
opcache \ | ||
pdo_mysql \ | ||
zip \ | ||
; \ | ||
\ | ||
pecl install \ | ||
APCu-5.1.11 \ | ||
geoip-1.1.1 \ | ||
redis-3.1.6 \ | ||
; \ | ||
\ | ||
docker-php-ext-enable \ | ||
apcu \ | ||
geoip \ | ||
redis \ | ||
; \ | ||
\ | ||
runDeps="$( \ | ||
scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \ | ||
| tr ',' '\n' \ | ||
| sort -u \ | ||
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ | ||
)"; \ | ||
apk add --virtual .piwik-phpext-rundeps $runDeps; \ | ||
apk del .build-deps | ||
|
||
ENV MATOMO_VERSION %%VERSION%% | ||
|
||
RUN set -ex; \ | ||
apk add --no-cache --virtual .fetch-deps \ | ||
gnupg \ | ||
; \ | ||
\ | ||
curl -fsSL -o piwik.tar.gz \ | ||
"https://builds.matomo.org/piwik-${MATOMO_VERSION}.tar.gz"; \ | ||
curl -fsSL -o piwik.tar.gz.asc \ | ||
"https://builds.matomo.org/piwik-${MATOMO_VERSION}.tar.gz.asc"; \ | ||
export GNUPGHOME="$(mktemp -d)"; \ | ||
gpg --keyserver ha.pool.sks-keyservers.net --recv-keys 814E346FA01A20DBB04B6807B5DBD5925590A237; \ | ||
gpg --batch --verify piwik.tar.gz.asc piwik.tar.gz; \ | ||
rm -r "$GNUPGHOME" piwik.tar.gz.asc; \ | ||
tar -xzf piwik.tar.gz -C /usr/src/; \ | ||
rm piwik.tar.gz; \ | ||
apk del .fetch-deps | ||
|
||
COPY php.ini /usr/local/etc/php/conf.d/php-piwik.ini | ||
|
||
RUN set -ex; \ | ||
curl -fsSL -o /usr/src/piwik/misc/GeoIPCity.dat.gz https://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz; \ | ||
gunzip /usr/src/piwik/misc/GeoIPCity.dat.gz | ||
|
||
COPY docker-entrypoint.sh /entrypoint.sh | ||
|
||
# WORKDIR is /var/www/html (inherited via "FROM php") | ||
# "/entrypoint.sh" will populate it at container startup from /usr/src/piwik | ||
VOLUME /var/www/html | ||
|
||
ENTRYPOINT ["/entrypoint.sh"] | ||
CMD ["%%CMD%%"] |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
FROM php:7.1-fpm-alpine | ||
|
||
LABEL maintainer="[email protected]" | ||
|
||
RUN set -ex; \ | ||
\ | ||
apk add --no-cache --virtual .build-deps \ | ||
alpine-sdk \ | ||
autoconf \ | ||
freetype-dev \ | ||
geoip-dev \ | ||
icu-dev \ | ||
libjpeg-turbo-dev \ | ||
libpng-dev \ | ||
openldap-dev \ | ||
pcre-dev \ | ||
; \ | ||
\ | ||
docker-php-ext-configure gd --with-freetype-dir=/usr --with-png-dir=/usr --with-jpeg-dir=/usr; \ | ||
docker-php-ext-configure ldap; \ | ||
docker-php-ext-install \ | ||
gd \ | ||
ldap \ | ||
mysqli \ | ||
opcache \ | ||
pdo_mysql \ | ||
zip \ | ||
; \ | ||
\ | ||
pecl install \ | ||
APCu-5.1.11 \ | ||
geoip-1.1.1 \ | ||
redis-3.1.6 \ | ||
; \ | ||
\ | ||
docker-php-ext-enable \ | ||
apcu \ | ||
geoip \ | ||
redis \ | ||
; \ | ||
\ | ||
runDeps="$( \ | ||
scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \ | ||
| tr ',' '\n' \ | ||
| sort -u \ | ||
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ | ||
)"; \ | ||
apk add --virtual .piwik-phpext-rundeps $runDeps; \ | ||
apk del .build-deps | ||
|
||
ENV MATOMO_VERSION 3.5.0 | ||
|
||
RUN set -ex; \ | ||
apk add --no-cache --virtual .fetch-deps \ | ||
gnupg \ | ||
; \ | ||
\ | ||
curl -fsSL -o piwik.tar.gz \ | ||
"https://builds.matomo.org/piwik-${MATOMO_VERSION}.tar.gz"; \ | ||
curl -fsSL -o piwik.tar.gz.asc \ | ||
"https://builds.matomo.org/piwik-${MATOMO_VERSION}.tar.gz.asc"; \ | ||
export GNUPGHOME="$(mktemp -d)"; \ | ||
gpg --keyserver ha.pool.sks-keyservers.net --recv-keys 814E346FA01A20DBB04B6807B5DBD5925590A237; \ | ||
gpg --batch --verify piwik.tar.gz.asc piwik.tar.gz; \ | ||
rm -r "$GNUPGHOME" piwik.tar.gz.asc; \ | ||
tar -xzf piwik.tar.gz -C /usr/src/; \ | ||
rm piwik.tar.gz; \ | ||
apk del .fetch-deps | ||
|
||
COPY php.ini /usr/local/etc/php/conf.d/php-piwik.ini | ||
|
||
RUN set -ex; \ | ||
curl -fsSL -o /usr/src/piwik/misc/GeoIPCity.dat.gz https://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz; \ | ||
gunzip /usr/src/piwik/misc/GeoIPCity.dat.gz | ||
|
||
COPY docker-entrypoint.sh /entrypoint.sh | ||
|
||
# WORKDIR is /var/www/html (inherited via "FROM php") | ||
# "/entrypoint.sh" will populate it at container startup from /usr/src/piwik | ||
VOLUME /var/www/html | ||
|
||
ENTRYPOINT ["/entrypoint.sh"] | ||
CMD ["php-fpm"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
if [ ! -e piwik.php ]; then | ||
tar cf - --one-file-system -C /usr/src/piwik . | tar xf - | ||
chown -R www-data . | ||
fi | ||
|
||
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
always_populate_raw_post_data=-1 | ||
geoip.custom_directory=/var/www/html/misc | ||
display_errors=Off |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters