Sign inSign up

gaussian8/geoip2-nginx

By gaussian8

•Updated over 6 years ago

nginx with ngx_http_geoip2dynamic module

Image
0

57

gaussian8/geoip2-nginx repository overview

⁠Nginx with ngx_http_geoip2_module

  • Dockerfile
    FROM nginx:1.17.9
    ENV NGINX_VERSION=1.17.9
    RUN apt update \
      && apt install wget build-essential git libpcre3 libpcre3-dev libmaxminddb0 libmaxminddb-dev mmdb-bin zlib1g zlib1g-dev -y \
      && mkdir build && cd /build \
      && wget http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz \
      && tar -zxvf nginx-${NGINX_VERSION}.tar.gz && cd nginx-${NGINX_VERSION} \
      && git clone https://github.com/leev/ngx_http_geoip2_module.git \
      && ./configure --add-dynamic-module=/build/nginx-${NGINX_VERSION}/ngx_http_geoip2_module --with-compat \
      && make && make install \
      && cp /build/nginx-${NGINX_VERSION}/objs/ngx_http_geoip2_module.so /etc/nginx/modules/
    
  • nginx.conf
    load_module modules/ngx_http_geoip2_module.so;
    ...
    

Tag summary

Content type

Image

Digest

Size

135.8 MB

Last updated

over 6 years ago

docker pull gaussian8/geoip2-nginx:1.17.9