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 !!
- 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. - 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 - Now lets check if the new tagged image is created :
docker images
You should see the one you created with the tag - Lets push this image to the hub :
docker push rajupillai/jupyter_notebook:latest
- 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
, selectPublic
. - 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