Publish Image to Docker Hub¶
To share your image with your team or the public, you should store it in a Docker registry. Docker Hub serves as a registry that enables you to either privately share your images with your team or make them accessible to the public.
Let's see how you can do that.
Step 1: Create an Account on Docker Hub¶
Visit Docker Hub and create an account.
Step 2: Create a Repository¶
A Docker repository
is a collection of Docker images that are stored and made available for others to use and download.
Let's create a public repository named node-express
.
Step 3: Push Image to Docker Repository¶
-
Login to Docker Hub
-
Re-tag the Docker image you want to push
-
Push the image to repository
Step 4: Verify the Image in Docker Hub¶
Go to Docker Hub and verify if the image is pushed. Now, if the image is public, anyone can pull the image.