2017-11-30 16:44:55 +01:00
|
|
|
FROM debian:buster
|
2017-03-09 19:14:37 +01:00
|
|
|
LABEL maintainer "Jessie Frazelle <jess@linux.com>"
|
2015-11-23 23:24:19 +01:00
|
|
|
|
|
|
|
RUN apt-get update && apt-get install -y \
|
|
|
|
ca-certificates \
|
|
|
|
lua-cjson \
|
|
|
|
lua-iconv \
|
|
|
|
nginx-extras \
|
|
|
|
--no-install-recommends \
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
# forward request and error logs to docker log collector
|
|
|
|
RUN ln -sf /dev/stdout /var/log/nginx/access.log \
|
|
|
|
&& ln -sf /dev/stderr /var/log/nginx/error.log
|
|
|
|
|
|
|
|
COPY nginx.conf /etc/nginx/nginx.conf
|
|
|
|
COPY mime.types /etc/nginx/mime.types
|
2016-01-05 21:53:16 +01:00
|
|
|
COPY telize.conf /etc/nginx/conf.d/telize.conf
|
2015-11-23 23:24:19 +01:00
|
|
|
|
|
|
|
EXPOSE 80 443
|
|
|
|
|
2017-06-05 22:20:42 +02:00
|
|
|
ENV TELIZE_VERSION master
|
2016-12-28 01:34:48 +01:00
|
|
|
|
2015-11-23 23:24:19 +01:00
|
|
|
RUN buildDeps=' \
|
|
|
|
curl \
|
|
|
|
git \
|
|
|
|
' \
|
|
|
|
&& set -x \
|
|
|
|
&& apt-get update && apt-get install -y $buildDeps --no-install-recommends \
|
|
|
|
&& rm -rf /var/lib/apt/lists/* \
|
|
|
|
&& mkdir -p /usr/share/GeoIP \
|
2017-06-05 22:20:42 +02:00
|
|
|
&& curl -sSL https://geolite.maxmind.com/download/geoip/database/GeoIPv6.dat.gz -o /usr/share/GeoIP/GeoIPv6.dat.gz \
|
|
|
|
&& curl -sSL http://geolite.maxmind.com/download/geoip/database/GeoLiteCityv6-beta/GeoLiteCityv6.dat.gz -o /usr/share/GeoIP/GeoLiteCityv6.dat.gz \
|
|
|
|
&& curl -sSL http://download.maxmind.com/download/geoip/database/asnum/GeoIPASNumv6.dat.gz -o /usr/share/GeoIP/GeoIPASNumv6.dat.gz \
|
2015-11-23 23:24:19 +01:00
|
|
|
&& gunzip /usr/share/GeoIP/*gz \
|
2016-12-28 02:04:58 +01:00
|
|
|
&& git clone --depth 1 --branch "${TELIZE_VERSION}" https://github.com/fcambus/telize.git /usr/src/telize \
|
2017-02-26 23:34:54 +01:00
|
|
|
&& ( \
|
|
|
|
cd /usr/src/telize \
|
|
|
|
&& cp timezone*.conf /etc/nginx/ \
|
|
|
|
) \
|
2015-11-23 23:24:19 +01:00
|
|
|
&& rm -rf /usr/src/telize \
|
|
|
|
&& apt-get purge -y --auto-remove $buildDeps
|
|
|
|
|
|
|
|
CMD ["nginx", "-g", "daemon off;"]
|