DockerHub Hand's on

DockerHub Hand's on

"DockerHub" Step by Step Guide

·

2 min read

Very First step, we should have an account in "DockerHub" to perform the following steps.

Go to Google and type "docker hub " account creation.

After that, this screen will appear: Here my account is already created so you can create your account, It's a very easy process.

The important thing is that after successfully creating a docker hub account we can use the "docker login" command to sync with the "dockerhub" account. Please check screenshots for the reference.

The username will be your "dockerhub "username and password:

To check available images we can check with the "docker images" command

To replace the image name: The following is the command syntax.

Docker tag old image name:tag  username amitp9999/new image name

If we want to push or send the images to the dockerhub we are using the following command.

& the Java image was successfully deployed to the "dockerhub" platform.

We have again checked the available images on our local machine.

We have executed the command "docker system prune" to remove the stopped container.

Also used docker rmi imageid to remove the images & if the image were not removed then we can use "docker rmi -f 6497841c157c 6497841c157c 47a932d998b7"

Post that we can confirm that there are no images & containers are in a running state.

Then we can try to run the docker run command and appears the following error because we have already killed all images and Prune the all running containers. So unable to find the image locally.

Then we executed the command "docker run amitp9999/java-app:latest"

& it pulls the image from "Dockerhub"

Thank You!!

Happy Learning!!