Docker Community Forums

Share and learn in the Docker community.

Push an docker image to GitHub Repo


(Zagadish) #1

Hi All ,

I want to push an image to GitHub Repos , can we do that .

Thanks
Jagadish


(Ykyuen) #2

I think github doesn’t have a docker repository service right now. u could consider dockerhub.com for hosting a docker image.


(Deeruattavar) #3

try to make use of Docker registry for pushing the image, so u can keep backup and whenever you want, you can donload it from this registry. :slight_smile:


(Justin Bodnar) #4

If you’re dead set on this, you can tar the image, using the ‘docker save’ command, and push the tarball to your repo.

This violates Git best practices, but to each his own.


(Rslgradiant) #5

Why would you do that? There are no many good reasons to upload a docker image to GitHub.

Just upload it to DockerHub. If you want to share a docker image to the world in a non automatic and accesible way like DockerHub, just «docker-save» it and upload the tarball to Google Drive, Mega, S3 or another “sharing” file service.
You can also use your own hosted registry using Registry, Nexus3, Artifactory, etc if you want to set it private without paying for the service, by the cost of hosting it yourself, of course.


(Zagadish) #6

thanks All, will try to use the dockerhub