apilayer / freegeoip

IP geolocation web server
Other
730 stars 201 forks source link

apilayer/freegeoip docker image doesn't exist #2

Open justgage opened 6 years ago

justgage commented 6 years ago

I know that this repo just barely changed hands but I just wanted to create an issue to track this problem:

λ ~/code/freegeoip/ master docker run --restart=always -p 8080:4444 -d apilayer/freegeoip
Unable to find image 'apilayer/freegeoip:latest' locally
docker: Error response from daemon: pull access denied for apilayer/freegeoip, repository does not exist or may require 'docker login'.
See 'docker run --help'.
own3mall commented 6 years ago

Yep, I have the same issue.

julian-zehetmayr commented 6 years ago

Hey Guys,

We are working on this and should have an update here next week. In the meantime you can build from the old repo.

OlagStegan commented 6 years ago

Just the image ? 'cause that was easy enough to do with standard 'docker build' etc. Or will next week's include a fix to the Lets Encrypt issue ?

jasonsalzman commented 6 years ago

are there any updates on this? I'm still getting the same error. I know it's being switched over to a freemium model, nothing seems to be mentioned about removing the self-hosted solution

ghost commented 6 years ago

I was able to build an image and start the container with docker run <image id> after the same error, but now I am getting 404 for all requests. Does anyone know what the problem is?

seega commented 6 years ago

@julian-zehetmayr as I understand it, the docker repo will not be released?

keyurpatel89 commented 6 years ago

Hi @seega ,

You can use this : https://github.com/fiorix/freegeoip

rmstmg01 commented 6 years ago

It seems issue has not been fixed yet. I am getting the same error.

docker run --restart=always -p 8080:8080 -d apilayer/freegeoip
Unable to find image 'apilayer/freegeoip:latest' locally
docker: Error response from daemon: pull access denied for apilayer/freegeoip, repository does not exist or may require 'docker login'.
See 'docker run --help'.
OlagStegan commented 6 years ago

@rameshyonjan as noted above and elsewhere the free docker image has gone and has been replaced with a pay as you go API (free for first so many #hits)

If you had (like we did) taken a copy of the original code then you would still be able to rebuild your own docker image and use that. That is getting no further development AFAIK you would then need to employ/learn GOlang internal dev to fix bugs/improve/support

A PITA but that's Open Source for you

noskov commented 6 years ago

Hi there! If you want you can build your own Docker image.

  1. Just clone this official repo: git clone git@github.com:apilayer/freegeoip.git YOUR_LOCAL_PATH
  2. Go to the folder with the repo: cd YOUR_LOCAL_PATH
  3. Tell Docker to build the image: docker build .

That's all. In the result you'll have your own image from the latest codebase.

As an alternative you can use the image, that I've build recently, and pushed it to Docker Hub. You can find it here https://hub.docker.com/r/noskov/freegeoip/

Usage: docker run --restart=always -p 8080:8080 -d noskov/freegeoip

rmstmg01 commented 6 years ago

@noskov, Thanks for your suggestion. I build my own image from apilayer/freegeoip.git but it seems GEO database is not recent as IP GEO location is different than from https://www.maxmind.com/en/geoip-demo Is there any method I can use to update db from Maxmind Geo Database to my own docker image?

Thanks in advance.

noskov commented 6 years ago

Hi @rameshyonjan! I didn't change the database, so it's not tested, but I guess you can try to change it in Dockerfile with the CMD intruction. See here and rebuild the image with your own database settings.

Or, as an option, you can try to figure the server to use the custom database with the FreeGeoIP parameter -db=url-to-your-own-database.mmdb.gz (Default one is http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz).

See all the server params running docker run --rm -it apilayer/freegeoip -help

al-muammar commented 5 years ago

Hi @noskov, when I'm doing docker build . I'm getting the following error:

~/freegeoip$ docker build .
Sending build context to Docker daemon  1.768MB
Step 1/7 : FROM golang:1.9
1.9: Pulling from library/golang
55cbf04beb70: Pull complete
1607093a898c: Pull complete
9a8ea045c926: Pull complete
d4eee24d4dac: Pull complete
9c35c9787a2f: Pull complete
8b376bbb244f: Pull complete
0d4eafcc732a: Pull complete
186b06a99029: Pull complete
Digest: sha256:8b5968585131604a92af02f5690713efadf029cc8dad53f79280b87a80eb1354
Status: Downloaded newer image for golang:1.9
 ---> ef89ef5c42a9
Step 2/7 : COPY cmd/freegeoip/public /var/www
 ---> 41447a2e0446
Step 3/7 : ADD . /go/src/github.com/apilayer/freegeoip
 ---> 52888e9b264b
Step 4/7 : RUN  cd /go/src/github.com/apilayer/freegeoip/cmd/freegeoip &&       go get -d && go install &&      apt-get update && apt-get install -y libcap2-bin &&     setcap cap_net_bind_service=+ep /go/bin/freegeoip &&    apt-get clean
&& rm -rf /var/lib/apt/lists/* &&       useradd -ms /bin/bash freegeoip
 ---> Running in 848106df2f8d
# github.com/apilayer/freegeoip/apiserver
../../apiserver/api.go:106:9: undefined: prometheus.InstrumentHandler
../../apiserver/api.go:160:7: undefined: prometheus.InstrumentHandler
../../apiserver/api.go:162:7: undefined: prometheus.InstrumentHandler
../../apiserver/main.go:136:26: undefined: prometheus.Handler
The command '/bin/sh -c cd /go/src/github.com/apilayer/freegeoip/cmd/freegeoip &&       go get -d && go install &&      apt-get update && apt-get install -y libcap2-bin &&     setcap cap_net_bind_service=+ep /go/bin/freegeoip &&    apt-ge
t clean && rm -rf /var/lib/apt/lists/* &&       useradd -ms /bin/bash freegeoip' returned a non-zero code: 2

Don't you know, how to fix that?

noskov commented 5 years ago

Hi @Jihadik , I have no idea about that. Check your paths and Docker, maybe your issue is there.

justgage commented 5 years ago

For what it's worth I think this is 100% deprecated now. I don't think this will work anymore https://ipstack.com/ has replaced it, and sadly it's not free.

OlagStegan commented 5 years ago

I agree. All that original hard work gone to waste. Typical of so many Open Source efforts flushed down the commercial sewer. No one with sufficient knowledge of the original software+project to champion the cause. Pity

On Thu, Jul 18, 2019 at 5:10 PM Gage notifications@github.com wrote:

For what it's worth I think this is 100% deprecated now. I don't think this will work anymore.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/apilayer/freegeoip/issues/2?email_source=notifications&email_token=AIY4GFOS5VULPX322Q3AGMTQACIW3A5CNFSM4ESVV2HKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2I7TJQ#issuecomment-512883110, or mute the thread https://github.com/notifications/unsubscribe-auth/AIY4GFLGRUXC4H7BE7KU2DTQACIW3ANCNFSM4ESVV2HA .

seeurchin commented 5 years ago

I just forked a new one getting rid of prometheus monitoring to fix the problem of @Jihadik. It works, give it a try https://github.com/quantd2/freegeoip

justgage commented 5 years ago

The main issue we ran into is that for this to be useful we have to have the database of IP to lat & long that this used to download, which is no longer available. That the main thing that made this unusable for us.

seeurchin commented 5 years ago

that community database is still available on the maxmind. I already got it running in my staging environment

justgage commented 5 years ago
image

I'm not sure, but I think that they are going to get more and more out of date @quantd2, although they may not be removed for a while.

seeurchin commented 5 years ago

That's the legacy, the db integration of this repo is well base on the free supported version. image

// MaxMindDB is the URL of the free MaxMind GeoLite2 database. MaxMindDB = "http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz"

MaxMindDB is the free supported version. Anyway the country IP mapping database is unlikely to be updated regularly, plus since we are here I suppose we don't have to build a super precise geo-location service. For me it's good enough.

phips28 commented 3 years ago

I also got the error: Hook /opt/elasticbeanstalk/hooks/appdeploy/pre/03build.sh failed. Error response from daemon: pull access denied for apilayer/freegeoip, repository does not exist or may require 'docker login' Failed to pull Docker image apilayer/freegeoip:latest, retrying...

Is there a public docker container available?