Sign inSign up

svcops/geo_data

By svcops

•Updated about 15 hours ago

Image
0

7.9K

svcops/geo_data repository overview

⁠svcops/geo_data

Prebuilt IP geolocation databases packaged in a lightweight data image. Intended to be used as a data provider for other containers or jobs that need up-to-date IP-to-geo lookup files.

based on svcops/migrate:latest

This image contains:

  • GeoLite2-City.mmdb
  • GeoLite2-Country.mmdb
  • GeoLite2-ASN.mmdb
  • ip2region_v4.xdb
  • ip2region_v6.xdb
  • qqwry.dat
  • ipipfree.ipdb
  • geosite.dat
  • geoip.dat

All data files are placed under: /opt/src/geo_data

Note: Ensure you comply with the licenses and usage policies of the included databases (e.g., MaxMind GeoLite2, ip2region, QQWry, IPIP). This image is for convenience; you are responsible for legal usage in your environment.

⁠Tags

latest: always points to the newest build of the data bundle.

⁠Usage

Most consumers just need to copy the data out to a target location.

Example: copy data to a host folder

  • Linux docker run --rm -v $(pwd)/geo_data:/opt/target -e SRC=/opt/src/geo_data -e TARGET=/opt/target svcops/geo_data:latest
  • Windows PowerShell docker run --rm -v ${PWD}/geo_data:/opt/target -e SRC=/opt/src/geo_data -e TARGET=/opt/target svcops/geo_data:latest

The container base includes a migration helper that copies SRC to TARGET. After the container exits, the geo_data folder on your host will contain all databases.

Example: use as an init job in docker-compose

services:
  geo_data:
    image: svcops/geo_data:latest
    volumes:
      - ./geo_data:/opt/target
    environment:
      - SRC=/opt/src/geo_data
      - TARGET=/opt/target
    restart: "no"

docker compose run --rm geo_data

  • service name: geo_data

Then mount ./geo_data into your application container that needs these files.

Typical integration

  • Nginx/Envoy/Traefik geoip modules: mount needed .mmdb files
  • App services performing IP lookups via MaxMind or ip2region libraries
  • Batch pipelines that periodically refresh IP databases

⁠Refresh cadence

The image is built via GitHub Actions. Rebuild or pull latest to update to the newest upstream databases. If you rely on strict freshness, schedule a pull and refresh process in your environment.

⁠Add IPIP Free database (optional)

The public build only includes IPIP Free if the file is available at build time. To include it in your own build:

  1. Download ipipfree.ipdb from IPIP’s official source according to their terms.
  2. Place it under manual/ipipfree.ipdb before building the image.
  3. Build your own tag and use it in place of latest.

⁠Support

For commercial use or redistribution, consult each data vendor’s licensing.

Tag summary

Content type

Image

Digest

sha256:6f0b1d698…

Size

112.3 MB

Last updated

about 15 hours ago

docker pull svcops/geo_data