我正在使用maxmind GeoLite2二進制資料庫進行地理定位服務,并且我想定期更新它。
它可以通過 brew 安裝的 geoipupdate 程式進行更新。但是 Maxmind 提供了一個 docker鏡像來定期更新資料庫。當我嘗試在下面運行 docker 命令時,
docker run --env-file IdeaProjects/ip-geolocation-service/src/main/resources/application.properties -v /Users/me/GeoIp maxmindinc/geoipupdate
用環境檔案指application.properties,
GEOIPUPDATE_ACCOUNT_ID=12345
GEOIPUPDATE_LICENSE_KEY=aaaaaaaaaa
GEOIPUPDATE_EDITION_IDS=GeoIP2-Country
我收到以下錯誤:
# STATE: Creating configuration file at /etc/GeoIP.conf
# STATE: Running geoipupdate
error retrieving updates: error while getting database for GeoIP2-Country: unexpected HTTP status code: received HTTP status code: 403: Invalid product ID or subscription expired for GeoIP2-Country
由于我的憑據正在手動觸發,我想知道為什么它不能在 docker run 上運行?任何發現問題的想法或任何人都面臨過它?
uj5u.com熱心網友回復:
您寫道您想使用免費的 GeoLite2 資料庫,但您使用的 ID 看起來像商業/付費的。請嘗試以下操作:
GEOIPUPDATE_EDITION_IDS=GeoLite2-Country
來源:https ://github.com/maxmind/geoipupdate/blob/main/doc/docker.md
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/473646.html
上一篇:Docker退出代碼0問題
