dockerpython

How to upload a docker image to Docker Hub

Lets upload the docker image you build locally to docker hub so you or others can pull it at a later time to use. I am assuming you already have a login to docker hub. If not please create an account. Its free !! 

  1. From a command prompt type:

    docker images

    This will list out all the docker images you have on your machine including the one you build. 
  2. Now create a tag for the image you created.  On the previous post I named it Jupyter-notebook:

    docker tag jupyter_notebook:latest rajupillai/jupyter_notebook:latest

  3. Now lets check if the new tagged image is created :

    docker images

    You should see the one you created with the tag
  4. Lets push this image to the hub :

    docker push rajupillai/jupyter_notebook:latest

  5. If you want to make it public , so anyone can download it then :
    • Go to Docker Hub and log in.
    • Click on your profile icon and go to Repositories.
    • Click on your repository (rajupillai/jupyter_notebook in the example).
    • Click on the Settings tab for the repository.
    • Under Visibility, select Public.
    • Save the changes.

If you or anyone want to pull this to a new machine all you have to do now is :

docker pull rajupillai/jupyter_notebook:latest

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.