graphhopper / map-matching

The map matching functionality is now located in the main repository https://github.com/graphhopper/graphhopper#map-matching
https://www.graphhopper.com/open-source/
Apache License 2.0
785 stars 274 forks source link

Add docker #124

Closed 1kastner closed 5 years ago

1kastner commented 6 years ago

With docker the server can quickly be started without the need of having a java development environment on the computer. Is related to the idea #121 and the use case #120.

michaz commented 5 years ago

I don't use Docker myself, so I can only evaluate this by pattern-matching and googling.

The Dockerfile seems to be not similar to the Dockerfile of e.g. graphhopper itself, and also to be unusual for a Java project -- it inherits from a specific Linux distribution and installs the JDK manually. My knowledge is limited, but this doesn't seem to be what one would usually do.

Looking at the ticket you're referencing, this seems to be about a rather specific use case, so I'm not sure this is general enough to merge it.

1kastner commented 5 years ago

Ok, I might have a look at using java as the base image. My use case is rather general - just start map-matching in a docker-container. This way you don't install the dependencies on your own machine but have it bundled somewhere else.

1kastner commented 5 years ago

Btw. thank you for your feedback 👍

1kastner commented 5 years ago

I hope that the map-matching web app is interesting enough to be published as a docker image. Now I just used the Dockerfile and no docker-compose as that would be in fact a small overkill in this situation. Therefore my new version. Another nice trick: this allows is using different java versions and see how the maven project handles that.

1kastner commented 5 years ago

Another option is to have the docker containers generated automatically, see e.g. https://hub.docker.com/r/murphdasurf/map-matching/

1kastner commented 5 years ago

Some reasoning for why a file is placed at which place, why it can be useful etc. can be found here: https://github.com/graphhopper/graphhopper/pull/849. The commands can be used in pretty much the same way adjusted for this project.

1kastner commented 5 years ago

So many changes this PR would introduce... Seems like I messed something up, I will check it somewhen later

1kastner commented 5 years ago

I checked that if I opened a fresh new pull request with the same changes, the commits and 'foreign' changes would not be shown. Should I do this?

1kastner commented 5 years ago

I should have used rebase, all the commits and changed files are just a result of the merge and how things are displayed here.

raveenb commented 5 years ago

any update when this PR will be merged? a docker based system will be super useful

michaz commented 5 years ago

I stand with my comment -- there is nothing special about this project that would require a special dockerfile to go with it. It is a normal Java program that is configured by a configuration file and command line parameters. I think whoever uses Docker would know, or could easily find out, how to run this program with it.