Push the image to Dockerhub

Once we have built the image, it’s time to push it to the registry Docker Hub:

  1. Login to Docker Hub (if you don't have a Docker Hub account, create one by hitting https://hub.docker.com/):
     # docker login
  1. After successful login,  push the image to the Docker Hub. But before that, tag that image and then push it:

Syntax: docker tag <image_name> <username>/<image_name>:<version> 

             docker push <username>/<image_name>:version

You can view your newly created Docker image in Docker Hub account. This was all about getting us ready to move forward and play with container management services such as Kubernetes and ECS. Before moving ahead and using ECS, which is a container management service provided by AWS, we should know the private registry used by ECS, which is ECR. In the next recipe, we will learn about ECR.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.227.24.60