I have modified, added some extra applications to a running container, now I would like to push it to Docker Hub.
I have tagged my image like this:
docker tag hellodocker:mytag <myuser>/hellodocker:mytag
Pushing process was succesful, but after pull and run I see, that it contains only the base image, that I have used up, so intalled applications haven't "commited".
1) First login by typing sudo docker login
in the terminal. Enter username and password
2) Visit your docker account and create a new repository. In my case I created a repository zawad1879/dockerhub
3)Say you have a docker image with repository name:zawad/django and tag:latest.
In that case you will need to tag this image with a label of your wish. I decided to tag it with the label:myfirstimagepush. You tag the image by typing the command
sudo docker tag zawad/django:latest zawad1879/dockerhub:firstimagepush
4) Finally push the image to your repo using the command
sudo docker push zawad1879/dockerhub:firstimagepush
That's all there is to it.
It seems that you haven't done commit of your container. In order to do this - you have to execute the following command:
docker commit CONTAINER_ID CONTAINER_NAME
more on this: Docker commit
OR
You could simply execute docker
command and see its output:
...
commit Create a new image from a container's changes
...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With