Docker-compose up crashes
Closed this issue · 11 comments
Starting today, the israelhikingmap/graphhopper image has updated so that the entrypoint ./graphhopper.sh
is no longer found. Therefore, docker-compose doesn't start:
Starting graphhopper-docker_graphhopper_1 ... error
ERROR: for graphhopper-docker_graphhopper_1 Cannot start service graphhopper: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "./graphhopper.sh": stat ./graphhopper.sh: no such file or directory: unknown
ERROR: for graphhopper Cannot start service graphhopper: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "./graphhopper.sh": stat ./graphhopper.sh: no such file or directory: unknown
ERROR: Encountered errors while bringing up the project.
graphhopper.sh is expected to be removed from the graphhopper repo in the future so we removed it from the image creation, this is not new though, it has been like that for at least two month now.
See graphhopper/graphhopper#2361
Feel free to argue there that this file is important, maybe they'll keep it. :-)
I advise to use an officially released version and not the latest (the official 4.x still has this file I think, 3.x has this for sure as we still use 3.x version on our server with it).
We updated the documentation to show how to use the image without this file - i.e. use the jar files instead.
We might consider using a file maintained here in order to have the functionality that this file provides and avoid this problem, we haven't decided yet.
Feel free to submit a PR if this is something that you are relaying on and would like to help maintain.
@HarelM if you are using compose, can you add an example docker-compose.yml
file. I updated according to readme but it still crashes.
We are, I'll see what I can do. If you happen to solve this before I post feel few to make a PR to improve the docs.
Our docker compose:
graphhopper:
image: israelhikingmap/graphhopper:3.0
env_file: .env
volumes:
- ghdata:/data
- ./gh-config.yml:/usr/src/app/gh-config.yml
- ./elevation:/usr/src/app/elevation
entrypoint: ./graphhopper.sh -c /usr/src/app/gh-config.yml -i /data/asia_israel-and-palestine.pbf
command: web -o /data/default-gh/
healthcheck:
test: curl --silent --fail localhost:8989/health || exit 1
interval: 5s
timeout: 3s
start_period: 40s
ports:
- "8989:8989"
restart: "unless-stopped"
Our makefile command for updating the routing:
docker-compose run --rm --entrypoint "bash -c" graphhopper "wget -nv -O - > /data/asia_israel-and-palestine.pbf <address of pbf file, for example geofabrik>"
docker-compose run --rm -e JAVA_OPTS="-Xmx2g -Xms2g" graphhopper import -o /data/new-gh/ --force-download
docker-compose run --rm --entrypoint "bash -c" graphhopper "rm -r /data/default-gh ; mv /data/new-gh /data/default-gh"
docker-compose restart graphhopper
This uses the graphhopper.sh since it exists in version 3.0 of graphhopper image.
See #8 in regards to the removal and rewrite of graphhopper.sh file.
Feel free to submit a PR with updated documentation etc :-)
Thank you, I didn't check tags and was trying with latest tag. For now this fixes my problem and looks like latest release 4.0 also has graphhopper.sh
Can I close this issue then?
issue still exits on images without graphhopper.sh
, like latest
tag. looks like #8 or another fix needed.
@HarelM I think these commands for docker-compose are not up-to-date with the latest graphhopper.sh
Could you please share with us the new commands?
The graphhopper.sh can be found in this repo and you can use the docker image to get "help".
Found it, had to change the command to use "--import", now it builds the cache