Repository navigation
Add Dockerfile - #849
Add Dockerfile#849
Conversation
Build an image: docker build -t graphhopper:master . Run tests: docker run -it graphhopper:master ./maven/bin/mvn clean test verify Run graphhopper: docker run -it -p 8989:8989 -v /home/username/graphhopper-maps/:/data graphhopper:master /graphhopper.sh web /data/europe-latest.osm.pbf
|
+1 |
|
Thanks a lot! As we have currently already many files in the project root, is it possible to move the 2 new docker files to e.g. core/files or would it make things ugly/complicated? |
|
And I assume switching to a stable branch like 0.8 is possible via
Or what does graphhopper:master mean? |
|
If I move the Dockerfile to
graphhopper:master was just an example for a tag name of the docker image. One would build an image of the 0.8 branch by first checking it out and then use |
|
|
Hmmh, difficult. I thought I could just fetch the docker file and work with it (install it etc) without being attached to any repository or data? For normal production use I would prefer fetching the stable zip. But sometimes a tweak or bug fix is necessary. Maybe like in your 2nd suggestion but with
Sorry, have not yet any idea of the concepts for docker :) which makes it a bit hard to decide what to do |
I'd go with the 0th (Dockerfile inside the project root). Pros:
Cons:
My other suggestions require more work because the version number must be changed manually inside the Dockerfile on every new release. |
|
Ok, thanks for the explanation - convinced & merged :) |
As promised, I created a simple Dockerfile for GraphHopper.
Build an image:
docker build -t graphhopper:master .Run tests:
docker run -it graphhopper:master ./maven/bin/mvn clean test verifyRun graphhopper:
docker run -it -p 8989:8989 -v /home/username/graphhopper-maps/:/data graphhopper:master ./graphhopper.sh web /data/europe-latest.osm.pbfYou could add this Project to docker hub and let them build the images for you, which everyone can use.
Please let me know if there is something i should change.