Open In App

How to Push a Container Image to a Docker Repository?

Last Updated : 31 May, 2025
Summarize
Comments
Improve
Suggest changes
Share
Like Article
Like
Report

In this article we will look into how you can push a container image to a Docker Repository. We're going to use Docker Hub as a container registry, that we're going to push our Docker image to. 

how_to_push_a_container_image_to_a_docker_repository

Follow the below steps to push container Image to Docker repository:

Step 1: Create a Docker Account

The first thing you need to do is make sure that you have signed up for a Docker account. You can easily come to hub.docker.com, enter a Docker ID, your email address, and a password. That's all you need to do. This Docker account is completely free, and you don't have to pay a single dime for it. You want to make sure that you sign in. This will take you to your dashboard. As you can see here, we have not pushed any containers to my register yet:

Step 2: Log in to Docker from the Command Line

First, we will start off with typing the below command. Now, here our credentials are already authenticated, but if yours credentials are not added, this will ask you to enter your Docker ID and password that you would have created when you signed up for Docker Hub account. 

docker login

Step 3: Check your local images

The next thing we are going to need to do is, select an image that we want to push. So, we are going to type the below command:

docker images

We would use a awesomeapp image that we created earlier for this article. 

Step 4: Tag and Push Your Image

To push your image to Docker Hub, use the following command with the appropriate tag:

docker push awesomeapp/firstimage

Now, what it's doing is, taking that image that's on our local machine and pushing it out into the Docker Hub.

Step 5: Verify Your Image on Docker Hub

If we head back over to our Docker Hub, when we refresh the page, we can now see that image that we just pushed available here in our registry. 

At this point we have successfully pushed our docker image to Docker repository.

Conclusion

Pushing your Docker image to a repository is a great way to save it safely and share it with others. By signing up for a free Docker Hub account, logging in from the command line, choosing the image you want, and pushing it, you make your app easy to access anywhere. Now you have followed these simple steps and pushed your image, you can find it in your Docker Hub account anytime. This helps you share your work with your team or use it on other computers. Great job! Keep exploring Docker and have fun with your containers!


Next Article

Similar Reads