- Go to dockerhub and sign up/log in to your account.
- Click on Create a Repository.
- Give your repo a name, and description set private or public, and then click Create.
- Open the repo and terminal. Delete previous images.
- 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 .
- If this is your first time pushing, make sure you're logged in to Docker.
docker login
- Push the image as the last step.
docker push rakeshpotnuru/productivity-app-demo:client
- Now, if you go to your repository on docker hub, you will see your image.
- Since this image is public, anyone can pull it and use it.
docker pull rakeshpotnuru/productivity-app-demo:client