Publishing your images
You now have the ability to build container images from your application components and to run containers from these images on your local machine. However, in a production context, the machine on which you have built a container image is rarely the machine that you will run it on. To actually be able to deploy your application to any cloud environment, you will need a way to distribute built container images to any number of hosts.
This is where container registries come into play. In fact, you have already worked with a container registry earlier in this chapter, that is, the Docker Hub. Whenever you use a Docker image that is not present on your local machine (let's say, for example, the nginx
image), the Docker engine will pull this image from the Docker Hub onto your local machine. However, you can also use a container registry such as the Docker Hub to publish your own container images and then pull them from another instance.
At the Docker Hub (which you can access...