wiktorn / Overpass-API

Overpass API docker image
MIT License
134 stars 48 forks source link

Unable to initiate docker #51

Closed UriShavit closed 2 years ago

UriShavit commented 3 years ago

Hi, Tried to initiate the docker like in the example. I think the example referring to ./docker-entrypoint.sh? Didn't find any Docker file to run. Also when did that, the script prompt: image

Help would be very much appreciated!

wiktorn commented 3 years ago

Hi,

To clarify the structure of the repository - Dockerfiles are within the folders, that refer to specific version of overpass-api.

Regardless to the error that you stumbled on - yes the message comes from docker-entrypoint.sh, but as you didn't show full commandline, with which you tried to start, it's hard for me to reproduce it.

Chekcing the code, it looks like this line if failing:

echo "# Netscape HTTP Cookie File" > /db/cookie.jar

Which could fail only, if /db directory didn't exist. Can you tell more about your environment? Which docker runtime you're using and what kind of filesystem is under /data/transfer/open_street_map/overpass_clone_db/ ? Does this directory exists? If not, do you (or docker daemon user) have rights to create this directory?

UriShavit commented 3 years ago

Thank you for the fast reply! First time raising an env. So I might did some mistakes. I thought the script will create a docker for me. I just clone the git to /data/transfer/open_street_map. Then I created the /data/transfer/open_street_map/overpass_clone_db/ directory and tried to run the script. From your reply I'm guessing I missed a stage?

Edit: This is the full command I tried: image

UriShavit commented 3 years ago

the environment is a private server. I created the /db dir as you can see: image

wiktorn commented 3 years ago

There are few things here:

  1. If you want just to run the image, you don't need to clone the repository, just invoke

    docker run [...]

    As it is written in README. docker will automatically try to download the image from Docker Hub, where the image is hosted. Though right now, you'll need an account to download. You may create one on https://hub.docker.com/

  2. If you don't want to use image from Docker Hub or just want to build the software yourself, clone the repo, choose the version of the overpass-api, such as 0.7.56, and then from the root of the repo:

    cd 0.7.56
    docker build -t overpass-api .
    docker run [...]

    But in the last line, replace wiktorn/overpass-api with overpass-api (the image that you've built yourself). Of course, you may use any name you find suitable (provided that it's allowed by docker).

PS. Please do not paste commands that you run as images as this prevents copying the command and running it myself. Use "insert code" from formatting menu

UriShavit commented 3 years ago

Hi,

Thank you very much for yours support! Unfortunately, after checking my proxy settings, I noticed I am not getting any data from those sites: Err:1 http://deb.debian.org/debian stretch InRelease Could not connect to 192.168.69.12:3128 (192.168.69.12), connection timed out Err:2 http://security.debian.org/debian-security stretch/updates InRelease Could not connect to 192.168.69.12:3128 (192.168.69.12), connection timed out Err:3 http://deb.debian.org/debian stretch-updates InRelease Unable to connect to 192.168.69.12:3128: Reading package lists... W: Failed to fetch http://deb.debian.org/debian/dists/stretch/InRelease Could not connect to 192.168.69.12:3128 (192.168.69.12) W: Failed to fetch http://security.debian.org/debian-security/dists/stretch/updates/InRelease Could not connect to 192.168.69.1 W: Failed to fetch http://deb.debian.org/debian/dists/stretch-updates/InRelease Unable to connect to 192.168.69.12:3128: W: Some index files failed to download. They have been ignored, or old ones used instead.

I double checked it with my browser.

Further more, our Devops guy told me that we are using Ubuntu and this Debian dist won't be compatible. Is it hopeless to try? Is there an Ubuntu version for that image?

Also, I looked online for an Ubuntu version and found a version of a tile server. In the requirements it was said that the data is 1TB for the whole planet. Is it true?

wiktorn commented 3 years ago

From the error messsage it looks like you have misconfigured your proxy server or it's unreachable from your docker container. Switching to ubuntu would not change this problem.

There is no ubuntu version of this image. It shouldn't be a problem to change the base image from nginx to Ubuntu. For sure you'll need:

And maybe adapt some paths (not sure, if they are the same on ubuntu and nginx based image).

1TB of space for the whole planet sound reasonable, though it depends also on the style you want to use. For running overpass for whole planet, you will also need like few hundred GB for its database.

UriShavit commented 3 years ago

I followed those instructions and managed to change the proxy, and build successfully. Thank you!

Now, I wish to download parts of the world. Specifically Michigan and Israel. In the example you showed, the example was with Monaco. is it possible to get 2 places in 1 image?

wiktorn commented 3 years ago

No, it's not supported to include two areas in one docker container. If #43 would be solved, this could be done using polygons containing the areas that you're interested in, but still you would need to feed whole planet to it, so it could be longish to process.

Of course you can adapt this image to accept two sources of data and keeping your instance up-to-date. Overpass itself will not have a problem with that.