Javatpoint Logo
Javatpoint Logo

Docker Push Repository

We can push our Docker image to global repository. It is a public repository provided by Docker officially. It allows us to put our docker image on the server. It is helpful when we want to access our docker image from global. Follow the following steps to push custom image on the Docker hub.

  1. login to hub.docker.com
  2. We need to login to our account of Docker hub. If you don't have, create it first.

    Docker Push repository 1

    It will ask for username. Enter the dockerid here and press enter.

    Docker Push repository 2

    After providing username, it asks for password. Enter your account password here and it will show you your login status as succeeded.

  3. Tag Docker Image
  4. After login, we need to tag our docker image that we want to push. Following command is used to tag the docker image.

    username refers to our dockerid or the username which is used to login.

    image-name is the name of our docker image present on our system.

    See, screen shot of the above command.

    Docker Push repository 3

    In the above command, we have tagged docker image hello-world. Now, we need to push it to the repository. Let?s see it in the below command.

  5. Push Docker Image
  6. The following command is used to push docker image to docker hub repository.

    See, screen shot of the above command.

    Docker Push repository 4

    In the above screen shot, we can see that docker image has been pushed successfully.

    Now, login into our account at hub.docker.com and check our dashboard. It will have a new docker image named dockerid4irfan/hello-world.

    Docker Push repository 5

    Look at the screen shot, it has the newest one docker image which is just pushed. On the top, the first one is the newest image.






Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


B.Tech / MCA