Publishing a Docker image
Docker Hub provides a global repository of images. Throughout this chapter and Chapter 7, we’ve pulled Docker images that were stored in the Docker Hub repository. This includes the Docker Official Node.js image, which we used as a basis for our image in the Building a Docker container recipe in this chapter.
In this recipe, we’re going to publish our fastify-microservice
image to Docker Hub.
Getting ready
This recipe will use the image created in the previous recipe, Building a Docker container.
If you haven’t completed that recipe, the code is available in the Packt GitHub repository (https://github.com/PacktPublishing/Node.js-Cookbook-Fifth-Edition) in the Chapter11/fastify-microservice
directory.
How to do it…
In this recipe, we’re going to sign up for a Docker Hub account and publish our fastify-microservice
image to Docker Hub:
- First, we need to create a Docker Hub account. Visit https://hub...