2020-06-18 03:05:45 +02:00
|
|
|
FROM shurshun/openresty:latest
|
2015-11-23 23:24:19 +01:00
|
|
|
|
2018-03-23 22:14:50 +01:00
|
|
|
STOPSIGNAL SIGTERM
|
2015-11-23 23:24:19 +01:00
|
|
|
|
|
|
|
EXPOSE 80 443
|
|
|
|
|
2018-12-29 02:10:55 +01:00
|
|
|
ENV TELIZE_VERSION 66063c6c6e5bbbafcf493c5bc7c825f0a6e1b03d
|
2020-05-15 18:27:58 +02:00
|
|
|
ENV LICENSE_KEY lgNvGyhnUKpa5PJi
|
2016-12-28 01:34:48 +01:00
|
|
|
|
2020-06-18 03:05:45 +02:00
|
|
|
RUN apk add --no-cache \
|
|
|
|
ca-certificates \
|
|
|
|
curl \
|
|
|
|
git
|
|
|
|
|
|
|
|
RUN addgroup -S nginx \
|
|
|
|
&& adduser -D -S -h /var/cache/nginx -s /sbin/nologin -G nginx nginx
|
|
|
|
|
2018-03-23 22:14:50 +01:00
|
|
|
RUN set -x \
|
2020-06-18 03:05:45 +02:00
|
|
|
&& mkdir -p /usr/share/GeoIP \
|
|
|
|
&& curl -sSL "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Country&license_key=${LICENSE_KEY}&suffix=tar.gz" | tar -xzf - --strip-components 1 -C /usr/share/GeoIP \
|
|
|
|
&& curl -sSL "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-City&license_key=${LICENSE_KEY}&suffix=tar.gz" | tar -xzf - --strip-components 1 -C /usr/share/GeoIP \
|
|
|
|
&& curl -sSL "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-ASN&license_key=${LICENSE_KEY}&suffix=tar.gz" | tar -xzf - --strip-components 1 -C /usr/share/GeoIP \
|
|
|
|
&& git clone https://github.com/fcambus/telize.git /usr/src/telize \
|
|
|
|
&& ( \
|
|
|
|
cd /usr/src/telize \
|
|
|
|
&& git checkout "$TELIZE_VERSION" \
|
|
|
|
&& cp *.conf /etc/nginx/ \
|
|
|
|
) \
|
|
|
|
&& rm -rf /usr/src/telize
|
2018-03-23 22:14:50 +01:00
|
|
|
|
|
|
|
COPY nginx.conf /etc/nginx/nginx.conf
|
|
|
|
COPY mime.types /etc/nginx/mime.types
|
|
|
|
COPY telize.conf /etc/nginx/conf.d/telize.conf
|
2015-11-23 23:24:19 +01:00
|
|
|
|
|
|
|
CMD ["nginx", "-g", "daemon off;"]
|