Working with Docker Some useful commands

Docker Commands:-

Following are some very useful docker commands for working with docker.

#Pulling raw image from docker (latest ubuntu image) docker pull ubuntu #Listing all docker images available in local machine docker images #image ubuntu start running docker container named vcontainer with docker run –name vcontainer ubuntu /bin/bash #list out all running container docker ps -l #remove running container docker rm container_id #remove image docker rmi -f image_id #rename docker container docker rename old new #commit docker image docker commit -m “##message##” containterid imageid #push docker image on hub.docker.com docker push image

* Remember don’t stop your docker container before pushing changes otherwise the changes will drop.

Leave a Reply

Your email address will not be published. Required fields are marked *