List of 20 docker commands and their use cases with examples.
Limited Time Offer!
For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!
- docker pull – used to pull images from the docker repository(hub.docker.com)
- docker run – used to create a container from an image
- docker ps – used to list the running containers
- docker ps -a – used to show all the running and exited containers
- docker exec – used to access the running container
- docker stop – stops a running container
- docker kill – kills the container by stopping its execution immediately.
- docker commit – creates a new image of an edited container on the local system
- docker push – used to push an image to the docker hub repository
- docker images – lists all the locally stored docker images
- docker rm – used to delete a stopped container
- docker rmi – used to delete an image from local storage
- docker build – used to build an image from a specified docker file
- docker stop – used to stop the container
- docker restart – used restart the container
- docker –version – used to get the currently installed version of docker