Details (encoded_values) are missing when using Docker?

Can you tell me what are the minimal files needed after the build?

For only running the GraphHopper server you need

Then also just the JRE is enough to run:

java -jar graphhopper.jar server config.yml

When you use the graphhopper.sh script you only need the repo but then you need maven, a JDK and also some utilities like wget to fetch the PBF. (wget could be easily installed via apt I think)

Thanks! I kinda figured it out myself. :slight_smile:
I did some modification to graphopper.sh to use maven only when needed and not install it on every command, and another fix with the config file that was begin copied when config.yml did not exist.
I’m creating fake tags now to see if the image is being pushed to dockerhub, having trouble with appvoyer as it seems to be annoying regarding deployment. In any case, I should be able to overcome it soon.
I can install only wget assuming this is the only thing needed that is missing in jre-slim, but since it’s a difference of only 30Mb I tend to see that the current image is working and then maybe reduce its size more. Current image size is 126Mb which is a third of what it used to be :slight_smile:
I’m guessing I’ll be finishing this off tomorrow, it’s a bit late here now…

1 Like

Sounds great - thanks!

OK, I finally managed to figure out how to properly do it (without appveyor hacks :-))
Dockerhub has a build system of his own for docker images (not surprising).
I was able to define what it needs so that it will build the latest image for every commit and build a version when a tag is set.
I have logged in to the dockerhub account of graphhopper but was not able to define the same.
The following is what I want to define in dockerhub automatic build configuration:


But when I try to select graphhopper repository from graphhopper github company I can’t, not sure why, maybe permissions issues…?

I’ll send a pull request for the changes in graphhopper.sh and dockerfile today regardless…

I’ve sent a pull request with all my changes (not a lot of changes).
The configuration above is currently the only pending issue as far as I see.
The following is where a constantly updating image exists until this is resolved:
https://hub.docker.com/r/harelmazor/graphhopper
I’ve done just a few tests with these images - mainly create a graph and import to create cache - in order to be able to run a graph refresh fully from docker.
Let me know if you figure out why I can’t change the dockerhub settings…

1 Like

Can you try again?

Still the same, but it seems that you were able to configure it as there are two definitions now which where not there before…, I think

Yeah, I cannot make it working too. This seems more complicated than it should be. Maybe we just build the image on the CI and push it to docker hub?

It keeps a clean separation of concers. It can be done in appveyor like I did in ealier commits but it feels like a hack and adds ugly code. Do you want me to try and send a support mail in dockerhub?

Isn’t it just
docker build .
and
docker push
?

It’s no more than a few lines of code in the build, I agree, basically:

if (tag)
switch to linux container
docker login
docker build
docker push latest
docker push tag

And add the login user and password as secret variables.
But I think it’s much cleaner to keep it in dockerhub, moreover after I managed to do it on my repository. I hope it’s not a company thing where it is not available for companies but only for single developers…
I’ll send a support request and see how fast they response…

I sent a support message. I hope to hear back from them soon…
If you prefer, I can check-in the relevant changes to appveyor.yml and maybe remove them once this issue is resolved…?
I have pushed an image from my PC to make sure I have the relevant permissions and it seems to be working as expected.

Yes, sounds good!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.