As mentioned in the previous recipe, Docker image registries act as hubs to store and share images. In this recipe, we'll see how to push the image to the registry using the docker image push command. Later in this chapter, we'll cover how to set up the private registry.
Publishing an image to the registry
Getting ready
Ensure that you have successfully logged in to hub.docker.com because, in this recipe, we will be pushing an image to hub.docker.com. Alternatively, you could use a private or third-party Docker image registry.
How to do it...
The following are...