Push an docker image to GitHub Repo

Hi All ,

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

Thanks
Jagadish

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

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:

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.

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.

thanks All, will try to use the dockerhub

1 Like