2015-11-23 23:24:19 +01:00
|
|
|
FROM debian:jessie
|
|
|
|
MAINTAINER Jessica Frazelle <jess@docker.com>
|
|
|
|
|
2016-08-12 04:09:43 +02:00
|
|
|
RUN apt-get update && apt-get install -y \
|
|
|
|
gnupg \
|
|
|
|
--no-install-recommends \
|
|
|
|
&& apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62 \
|
2015-11-23 23:24:19 +01:00
|
|
|
&& echo "deb http://nginx.org/packages/mainline/debian/ jessie nginx" >> /etc/apt/sources.list
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
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 \
|
|
|
|
&& curl -sSL https://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz -o /usr/share/GeoIP/GeoIP.dat.gz \
|
|
|
|
&& curl -sSL http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz -o /usr/share/GeoIP/GeoLiteCity.dat.gz \
|
|
|
|
&& curl -sSL http://download.maxmind.com/download/geoip/database/asnum/GeoIPASNum.dat.gz -o /usr/share/GeoIP/GeoIPASNum.dat.gz \
|
|
|
|
&& gunzip /usr/share/GeoIP/*gz \
|
|
|
|
&& git clone https://github.com/fcambus/telize.git /usr/src/telize \
|
|
|
|
&& cd /usr/src/telize \
|
|
|
|
&& cp timezone*.conf /etc/nginx/ \
|
|
|
|
&& rm -rf /usr/src/telize \
|
|
|
|
&& apt-get purge -y --auto-remove $buildDeps
|
|
|
|
|
|
|
|
CMD ["nginx", "-g", "daemon off;"]
|