mpolden / echoip

IP address lookup service
https://ifconfig.co
BSD 3-Clause "New" or "Revised" License
4.01k stars 526 forks source link

Flags provided but not defined: docker-compose #159

Closed afzl-wtu closed 2 years ago

afzl-wtu commented 2 years ago

There are other duplicate issues but no one worked for me. After spending my 6 to 8 hours without eating or drinking anything, I finally found there is a bug in echoip, whenever I run sudo docker-compose up: image

My compose file: image

I have tried every possible combination: "-C 0 -p -r -H X-Forwarded-For -a /data/GeoLite2-ASN.mmdb -c /data/GeoLite2-City.mmdb -f /data/GeoLite2-Country.mmdb" "-C 0 -p -r -H=X-Forwarded-For -a /data/GeoLite2-ASN.mmdb -c /data/GeoLite2-City.mmdb -f /data/GeoLite2-Country.mmdb"

If I try: "-H=X-Forwarded-For -a /data/GeoLite2-ASN.mmdb -c /data/GeoLite2-City.mmdb -f /data/GeoLite2-Country.mmdb -p -r" It considers all other flags and theier values as a value of -H: image

If I try: "-a /data/GeoLite2-ASN.mmdb -c /data/GeoLite2-City.mmdb -f /data/GeoLite2-Country.mmdb -H=X-Forwarded-For -p -r" image

If I try: "-a=/data/GeoLite2-ASN.mmdb -c=/data/GeoLite2-City.mmdb -f=/data/GeoLite2-Country.mmdb -H=X-Forwarded-For -p -r" It considers all other flags and their values as value of -a image

ShlomiPorush commented 2 years ago

did you download GeoIP Files?

afzl-wtu commented 2 years ago

did you download GeoIP Files?

image

afzl-wtu commented 2 years ago

did you download GeoIP Files?

Even if I try this: "-p -r -H=X-Forwarded-For"

image

ShlomiPorush commented 2 years ago

dont know if it related, why do you use the full path in the volume? try

    volumes:
      - ./geoipupdate:/data:ro
afzl-wtu commented 2 years ago

dont know if it related, why do you use the full path in the volume? try

    volumes:
      - ./geoipupdate:/data:ro

in my last reply bro you can see volumes or geolite2 is irrelevant. It is pure issue of flags.

ShlomiPorush commented 2 years ago

I have no idea where the problem is. In my setup it works fine.

-C 0 -p -r -H X-Forwarded-For -a /data/GeoLite2-ASN.mmdb -c /data/GeoLite2-City.mmdb -f /data/GeoLite2-Country.mmdb -t /html

afzl-wtu commented 2 years ago

I have no idea where the problem is. In my setup it works fine.

-C 0 -p -r -H X-Forwarded-For -a /data/GeoLite2-ASN.mmdb -c /data/GeoLite2-City.mmdb -f /data/GeoLite2-Country.mmdb -t /html

Strange, I just copied your docker-compose in a new a.yaml file and changed volume mapping to mine one, and now everything is working fine. sudo docker-compose -f a.yaml up. Thanks for your quick response and help. But I will pposr both files here may be some UTF text issue.

afzl-wtu commented 2 years ago

Not Working:

version: '3.7'
services:
  echoip:
    image: mpolden/echoip
    volumes:
      - "/home/afzl/@Apps/geoip/geoipupdate:/data"
    command:
      - "-C 0 -p -r -H X-Forwarded-For -a /data/GeoLite2-ASN.mmdb -c /data/GeoLite2-City.mmdb -f /data/GeoLite2-Country.mmdb"
    ports:
      - "2087:8080"

Working Fine:

version: '3.7'

services:
  echoip:
    image: mpolden/echoip
    command: "-C 0 -p -r -H X-Forwarded-For -a /data/GeoLite2-ASN.mmdb -c /data/GeoLite2-City.mmdb -f /data/GeoLite2-Country.mmdb"
    ports:
      - 2087:8080
    volumes:
      - /home/afzl/@Apps/geoip/geoipupdate:/data