From the course: Docker Certified Associate (DCA) Cert Prep

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Publishing image to Docker Hub

Publishing image to Docker Hub

So, now that you have learned how to create your image using dockerfile and verify that using different mechanism. Let us also understand when you create the image how do you publish it or push it to a docker hub or any other registry. We will see an example here how we can push our custom created image to docker hub. you try to push any image to docker hub ensure that you have logged in using the docker login command so in this image you can see the docker login has been used and appropriate authentication has been provided and then we try to push the image to a pre-created repository that means a repository must have created before you push the image. So in this context we have DCA repo v2 to which we are going to push our image. In this image you can see after pushing the image it is showing us the different versions that we have tagged and the image name.

Contents