Support Publish Studio onProduct Hunt
Last updated:
Rakesh Potnuru
Author

Step-by-Step Guide: Pushing a Docker Image to DockerHub

  1. Go to dockerhub and sign up/log in to your account.
  2. Click on Create a Repository.
  3. Give your repo a name, and description set private or public, and then click Create.

creating repository

  1. Open the repo and terminal. Delete previous images.
  2. Build new image with name <hub-username>/<repo-name>[:<tag>]. Tag is optional here, however, if you are pushing multiple images to the same repo, include one.
docker build -t rakeshpotnuru/productivity-app-demo:client .
  1. If this is your first time pushing, make sure you're logged in to Docker.
docker login
  1. Push the image as the last step.
docker push rakeshpotnuru/productivity-app-demo:client
  1. Now, if you go to your repository on docker hub, you will see your image.

image pushed to dockerhub

  1. Since this image is public, anyone can pull it and use it.
docker pull rakeshpotnuru/productivity-app-demo:client

LEAVE A COMMENT OR START A DISCUSSION

MORE SNIPPETS

Subscribe to Newsletter

Weekly


  • Never miss an update.
  • Get articles and snippets directly to your inbox.
  • Subscribe to stay connected and avoid getting lost among millions of websites.

Monthly


  • Coming soon...