Docker image based on alpine:3.8
with xtables-addons and Martin Schmitt's GeoLite2xtables scripts to create legacy format GeoIP database.
Note: As of 7 January 2020, changes have been made to the convert script, see commit 329927a6.
Sign up for a MaxMind account and create a license key to use their GeoLite2 databases. On running the Docker set your license key as an environment variable (-e LICENSE_KEY=xxxxxxxxxxxxxxxx
, where xxxxxxxxxxxxxxxx
is your license key).
A volume /xt_build
can be used to get the results. Replace [path to folder]
in the following commands with the correct path to the xt_geoip
on the host machine. On Ubuntu the default GeoIP data folder is /usr/share/xt_geoip
.
$ git clone https://github.com/sander1/docker-xtables.git
$ cd docker-xtables
$ docker build --tag=xtables_geoip .
$ docker run -e LICENSE_KEY=xxxxxxxxxxxxxxxx --rm -v [path to folder]:/xt_build xtables_geoip
$ docker run -e LICENSE_KEY=xxxxxxxxxxxxxxxx --rm -v [path to folder]:/xt_build sander1/xtables_geoip