Skip to content

Added docker push on every commit and tags - #2004

Closed
HarelM wants to merge 1 commit into
graphhopper:masterfrom
HarelM:master
Closed

HarelM wants to merge 1 commit into
graphhopper:masterfrom
HarelM:master

Conversation

@HarelM

@HarelM HarelM commented Apr 18, 2020 •

Copy link
Copy Markdown
Contributor

Related to #1985.
While dockerhub has this out-of-the-box it seems that there's an issue with configuring this properly there.
I have sent a support request but was not answered yet.
In the meantime, this should cover this. It can be removed if the dockerhub issue is resolved.

@karussell

Copy link
Copy Markdown
Member

Unfortunately docker says:

Error response from daemon: Get https://registry-1.docker.io/v2/: unauthorized: incorrect username or password

@HarelM

HarelM commented Apr 19, 2020

Copy link
Copy Markdown
Contributor Author

Secure variables are not evaluated when sending a pull request for security reasons in appveyor.
It might be that after merging this, a new secure variables will be needed as I have used these variables in my repository and I'm not sure secure variables can be shared across forks (It will probably be a security issue if they were shared across forks I guess).
So after merging this there will probably be a need to go here:
https://ci.appveyor.com/tools/encrypt
And write the docker user name and docker password and update the secure string in the appveyor.yml.
I haven't sent a PR with secure variables before, so this is a bit new to me. I am using secure variables in my project though.

@HarelM

HarelM commented Apr 21, 2020

Copy link
Copy Markdown
Contributor Author

I've pushed the latest github released version (1.0-pre31) to dockerhub but this version suffers from the issues I've fixed in previous PR.
Any chance you can create a new pre-release and I'll push the relevant version to dockerhub until this PR is resolved?

@karussell

Copy link
Copy Markdown
Member

Does it work now with the new version?

@HarelM

HarelM commented Apr 29, 2020

Copy link
Copy Markdown
Contributor Author

I've manually pushed 1.0-pre38 to dockerhub now and it works as expected, thanks!
Let me know if there's anything else I can help with regarding this PR in order to get it merged.

@karussell

Copy link
Copy Markdown
Member

It still fails due to the credentials. What to do in this regard?

@HarelM

HarelM commented Apr 29, 2020

Copy link
Copy Markdown
Contributor Author

Use the encryption tool link above using the appveyor user to encrypt the docker user name and password, use the encrypted values in the appveyor file in place of the existing variables I wrote.

@HarelM

HarelM commented May 11, 2020

Copy link
Copy Markdown
Contributor Author

@karussell any updates on this?

@karussell

Copy link
Copy Markdown
Member

I cannot manage additional effort here (or not in a fast manner). It would be best if it is possible without me.

@HarelM

HarelM commented May 11, 2020

Copy link
Copy Markdown
Contributor Author

I can't do it since I don't have the right permissions... :-(
The best option to also avoid build failures on pull requests (which this PR might create now that I think about it) is to do it from dockerhub, but I understood there was an issue there...
I hate to keep nagging, if this is something that won't happen please close this PR as not merged. :-(

@karussell

Copy link
Copy Markdown
Member

I can't do it since I don't have the right permissions... :-(

For docker hub you have push&pull permissions

I hate to keep nagging, if this is something that won't happen

I would love to make this happen but it is best to not bet on me as I have no time in the next ~4 weeks for this

@HarelM

HarelM commented May 11, 2020

Copy link
Copy Markdown
Contributor Author

Seems like push and pull are not enough to set the automated builds, I think.
This is not urgent of course. Feel free to ping me when you have the time :-)

@HarelM

HarelM commented Jul 21, 2020

Copy link
Copy Markdown
Contributor Author

Any updates on this? I was thinking I could delete my fork and create it again to be synced with this repo and use my docker builds to keep harelm/graphhopper dockerhub image up-to-date but then I realised this pull request it still open and I don't want it to get lost...

@HarelM

HarelM commented Aug 3, 2020

Copy link
Copy Markdown
Contributor Author

As a side note I have created a repository that is constantly synced with this repository and should update my graphhopper image here:
https://hub.docker.com/r/harelmazor/graphhopper
The repository is here:
https://www.github.com/IsraelHikingMap/graphhopper
This uses the dockerhub builds and does not need this commit in theory.
I managed to do it by revoking the dockerhub credentials from github from my HarelM account and connecting it again using dockerhub connections and granting permissions to IsraelHikingMap "company".
Let me know if there's anything I can do to progress this (using dockerhub builds) as I think it's a better solution than this PR.
I believe that in order to properly configure this I need permissions to both graphhopper company in github and dockerhub which I believe is too much to ask so all I can do is help with configuration problems...
Ping me if this is something you are interested in, feel free to use the forum if needed.

@HarelM

HarelM commented Sep 30, 2020

Copy link
Copy Markdown
Contributor Author

Seems that creating a repository that is fully synced including tags is a hassle on github.
I'd be happy to help out configuring the dockerhub to create an image automatically instead of this pull request... I think I know what didn't work in the last attempt...

@boldtrn

boldtrn commented Sep 30, 2020

Copy link
Copy Markdown
Member

BTW: in addition to Github Packages, there is also the Github Container Registry where this could be also pushed to if that's easier.

@HarelM

HarelM commented Sep 30, 2020

Copy link
Copy Markdown
Contributor Author

I'm guessing there will be a need to add a github action or something similar (but there's a credential stuff that needs to be addressed according to this. I couldn't find good documentation on GitHub Container Repository, but I believe you are right in theory...

@karussell karussell mentioned this pull request Oct 1, 2020
@karussell

karussell commented Oct 1, 2020 •

Copy link
Copy Markdown
Member

@HarelM if you would like to take over the Docker image creation please do this and we'll include it in our readme again. For now I'll remove it: #2141.

As docker was never well maintained and is also not used from the developers. Also it is not really required as the installation is basically a two step process which is especially under windows much easier (install JVM + run a self-contained jar file)

@karussell karussell closed this Oct 1, 2020
@HarelM

HarelM commented Oct 1, 2020

Copy link
Copy Markdown
Contributor Author

This is disappointing :-(
I've volunteered to maintain the docker image, dockerfile and any issues related to docker.
I've pushed changes to the dockerfile to make sure it works and I'm personally using the images on my production server and my development environment, so I don't know where the statement of "developers are not using it" comes from...
I don't think the image should be anywhere else besides graphhopper/graphhopper in dockerhub as I think people will have a hard time finding it anywhere else, and I've just learned that make a repository in sync with another in a hassle which I prefer to avoid.
I lack the proper permission in this repository (github) and the dockerhub repository to make it work the way I would like it to work.
If given the right permissions I'm sure I can make it work in a few hours, and I promise not to harm anything else. I can sign a contract if need be.
Using docker removes all the necessity to know which java version to install and in general is a very easy way to upgrade versions and run it locally. You'd need to know a thing or two about docker, that's true, and this is of course the trade-off...
Please, please, please don't remove docker...

@karussell

Copy link
Copy Markdown
Member

Thanks for your contribution and it is still welcome :) (see below)

I don't know where the statement of "developers are not using it"

I meant the image. It was outdated by several months and caused confusion, see #1985.

I lack the proper permission in this repository (github) and the dockerhub repository to make it work the way I would like it to work.

Why can't you build an image on your own? We can then link to it from our Readme.

@HarelM

HarelM commented Oct 1, 2020

Copy link
Copy Markdown
Contributor Author

There's no issue in building an image on my own, I did it for version 1.0 and pushed it dockerhub - for this I have permissions.
Can be seen here:
https://hub.docker.com/r/graphhopper/graphhopper/tags
I would like to avoid this manual work, but there are problems with that:
I tried to create a repository that is a clone of this repository, but it seems there are issues in doing so (the tags were not copied). It is possible, but too complex and I would like to avoid bashing my head against it.
I don't have permissions to configure the automated builds in dockerhub for graphhopper which I think is the most elegant and right solution.

I have received the 2.0 version mail and I plan to clone the code as it was in 2.0 and push an image I create locally to dockerhub, But it's manual and therefore error prone...

@cloudlena

Copy link
Copy Markdown

Has this stopped working? I don't see a 9.1 tag on Docker Hub.

The https://hub.docker.com/r/israelhikingmap/graphhopper image was last updated three months ago, and the https://hub.docker.com/r/graphhopper/graphhopper one doesn't exist anymore.

@HarelM

HarelM commented Jun 12, 2024

Copy link
Copy Markdown
Contributor Author

@cloudlena thanks for the ping. The docker image push repo https://github.com/IsraelHikingMap/graphhopper-docker-image-push is generally inactive, so the actions stop running after a while.
I've enabled them again and ran a new build, new image should be up shortly.
Feel free to open issues there next time it happens.

@cloudlena

Copy link
Copy Markdown

Awesome. Many thanks, @HarelM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants