Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I put my docker repository/image on GitHub/Bitbucket?

Tags:

docker

I know that Docker hub is there but it allows only for 1 private repository. Can I put these images on Github/Bitbucket?

like image 650
daydreamer Avatar asked Apr 21 '16 17:04

daydreamer


People also ask

Can we store Docker images in Bitbucket?

Bitbucket is now the only tool your team needs to code, build, test and deploy your applications in the cloud, covering the full lifecycle for teams building with microservices. “With the ability to build Docker images, we're able to build and deploy to AWS ECS all from within Bitbucket Pipelines.

Can I store Docker images on GitHub?

You can publish Docker images to a registry, such as Docker Hub or GitHub Packages, as part of your continuous integration (CI) workflow.


1 Answers

In general you don't want to use version control on large binary images (like videos or compiled files) as git and such was intended for 'source control', emphasis on the source. Technically, here's nothing preventing you from doing so and putting the docker image files into git (outside the limits of the service you're using).

One major issue you'll have is git/bitubucket have no integration with Docker as neither provide the Docker Registry api needed for a docker host to be able to pull down the images as needed. This means you'll need to manually pull down out of the version control system holding the image files if you want to use it.

If you're going to do that, why not just use S3 or something like that?

If you really want 'version control' on your images (which docker hub does not do...) you'd need to look at something like: https://about.gitlab.com/2015/02/17/gitlab-annex-solves-the-problem-of-versioning-large-binaries-with-git/

Finally, docker hub only allows one FREE private repo. You can pay for more.

like image 120
Ray Avatar answered Oct 05 '22 16:10

Ray