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.
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
I’m guessing I’ll be finishing this off tomorrow, it’s a bit late here now…
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:
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…
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?
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.