Signup/Sign In

What is Docker Hub?

Docker Hub is a public registry where docker images are hosted. Docker Hub is the world's largest library of docker images. By default, the docker client downloads docker images from Docker Hub only.

For example, if you have a Dockerfile in which you are using an Alpine Linux image, to install Linux inside the container, then docker will download this image from Docker Hub, unless and until you specify some other address for downloading the docker image.

What is a Docker Registry?

A Docker Registry stores docker images. When you install docker on your computer a local registry is created to store your Docker images. As mentioned in the introduction, Docker Hub is a public repository or we can say it's a Docker registry as a Service, where you can create an account and then host your docker images.

You can also set up your own docker registry, and host it privately on your server.

Docker Hub

The URL to access Docker Hub is:

You can register on Docker hub, all you have to do is pick a Docker Id, which is like a username for the Docker Hub website, provide your email address and a password, and you are done. You have a Docker Hub account now.

You will have to verify your email address to create a repository, so do that first, before you proceed with anything else.

In Docker hub, you can do the following:

  1. Create repositories for your projects.

  2. Host your docker images in repositories, just like the repository in Github is used to contain the project code, here we keep project docker images.

  3. You can give access to your team members to access your docker images.

  4. You can create both Public and Private repositories.

  5. By default, you get 1 FREE private repository, for more you will have to upgrade your account.

In Docker Hub, you will find almost all the popular Docker images that you can use.

docker hub container images list

Create a Docker Hub Repository

If you click on the Repositories option available in the top navigation bar, the repositories page will open.

docker hub repositories

Initially, there should be no repositories, so let's create one.

Click on the button Create Repository to create a new repository.

create docker hub repository

Provide a Name and a Description (in less than 100 characters), and click on Create. Keep the repository Public if you are using it for learning purpose.

And that's it you repository is created.

docker repository

In the next tutorial we will learn how we can tag and push a docker image to the Docker Hub repository.

About the author:
I like writing content about C/C++, DBMS, Java, Docker, general How-tos, Linux, PHP, Java, Go lang, Cloud, and Web development. I have 10 years of diverse experience in software development. Founder @ Studytonight