Build based on official nginx and telize
IP database location in /usr/share/GeoIP
For check:
localhost to _in file nginx.vh.default.confdocker run --rm -it --name nginx-geoip2 --net host -v $PWD/nginx.vh.default.conf:/etc/nginx/conf.d/default.conf jidckii/nginx-geoip2:latestcurl -I http://${you-host-or-ip}
example response:
HTTP/1.1 200 OK
...
x-geoip-continent_code: EU
x-geoip-country: Germany
x-geoip-country_code: DE
...
Content type
Image
Digest
Size
40.1 MB
Last updated
over 7 years ago
docker pull jidckii/nginx-geoip2