Pushing your image to Docker Hub

In the previous recipe, we saw how to run your microservice as a Docker container. Your image is not really useful unless you make it easier for shipping. In order for your image to be accessible from other places, you should first host it somewhere.

There are two ways of doing this: either push your image to the Docker Hub central repository, or create your own private Docker registry and push it there. Repositories created on Docker Hub are by default public. You can still purchase various plans to make your repositories private. That is completely up to you and depends on your use case.

Getting ready

  1. Before you can push the image to Docker Hub, you will first need a Docker Hub account. If you already have one, ...

Get Microservices Deployment Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.