Publish to Docker Hub

Learn important factors to consider when choosing a Docker registry and how to publish images to Docker Hub.

We can build Docker images once and run them anywhere on local, CI/CD, or production environments. However, to run a Docker image anywhere, it must be stored in a central place where it can be pulled and run whenever we want.

When we create a Docker image on a server, it remains on the host, which means we can’t run it on another computer. The Docker image must be pushed to a Docker registry before it can be pulled and used elsewhere.

In this tutorial, we learn to use Docker Hub to store Docker images.

Choose a container registry

A container registry is a place to store Docker images. This is similar to how a database is a place to store data. It gives a team a central location to handle Docker images, conduct vulnerability assessments, and configure who can access the images. However, not all container registries have the same features and functionality. Therefore, picking the right one isn’t easy.

Availability, automation, and security can all play a role in our decision-making process.

Before going with a Docker registry, we should be able to answer the following:

Availability:

  • What level of service availability
...