Skip to content

Commit

Permalink
Use last CC licensed MMDB
Browse files Browse the repository at this point in the history
  • Loading branch information
milesmcc committed Jan 8, 2024
1 parent 6e5aeb6 commit 073f426
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,13 @@ ARG MAXMIND_LICENSE_KEY_BASE64="Z2tySDgwX1htSEtmS3d4cDB1SnlMWTdmZ1hMMTQxNzRTQ2o5
RUN echo $MAXMIND_LICENSE_KEY_BASE64 > .mmdb_key

# Collect GeoIP Database
COPY assets/GeoLite2-ASN_20191224.tar.gz GeoLite2-ASN.tar.gz
COPY assets/GeoLite2-City_20191224.tar.gz GeoLite2-City.tar.gz
RUN apk add --no-cache curl && \
curl -m 180 "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-ASN&license_key=$(base64 -d .mmdb_key)&suffix=tar.gz" | tar -xvz -C /tmp && \
curl -m 180 "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-City&license_key=$(base64 -d .mmdb_key)&suffix=tar.gz" | tar -xvz -C /tmp && \
tar -xvz -C /tmp < GeoLite2-ASN.tar.gz && \
tar -xvz -C /tmp < GeoLite2-City.tar.gz && \
mv /tmp/GeoLite2*/*.mmdb /etc && \
rm GeoLite2-ASN.tar.gz GeoLite2-City.tar.gz && \
apk --purge del curl

# Move dependency files
Expand Down
Binary file added assets/GeoLite2-ASN_20191224.tar.gz
Binary file not shown.
Binary file added assets/GeoLite2-City_20191224.tar.gz
Binary file not shown.
3 changes: 3 additions & 0 deletions assets/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
This file contains GeoIP databases accurate as of 2019. We'd use newer databases, but MaxMind gates their free GeoIP databases behind a license key citing (an overly strict interpretation of) global data privacy regulation.

These files are the most recent version licensed under Creative Commons, pulled from the Internet Archive. For more information, see https://forum.matomo.org/t/maxmind-is-changing-access-to-free-geolite2-databases/35439/2.

0 comments on commit 073f426

Please sign in to comment.