VOOZH about

URL: https://www.javacodegeeks.com/2014/12/docker-common-commands-cheatsheet.html

⇱ Docker Common Commands Cheatsheet


Docker CLI provides a comprehensive set of commands. Here is a quick cheat sheet of the commonly used commands:
 
 
 
 
 
 
 
 
 
 

PurposeCommand
Build an imagedocker build –rm=true .
Install an imagedocker pull ${IMAGE}
List of installed imagesdocker images
List of installed images (detailed listing)docker images –no-trunc
Remove an imagedocker rmi ${IMAGE_ID}
Remove all untagged imagesdocker rmi $(docker images | grep “^” | awk “{print $3}”)
Remove all imagesdocker rm $(docker ps -aq)
Run a containerdocker run
List containersdocker ps
Stop a containerdocker stop ${CID}
Find IP address of the containerdocker inspect –format ‘{{ .NetworkSettings.IPAddress }}’ ${CID}
Attach to a containerdocker attach ${CID}
Remove a containerdocker rm ${CID}
Remove all containersdocker rm $(docker ps -aq)

 
What other commands do you use commonly ?

Reference: Docker Common Commands Cheatsheet from our JCG partner Arun Gupta at the Miles to go 2.0 … blog.
Do you want to know how to develop your skillset to become a Java Rockstar?
Subscribe to our newsletter to start Rocking right now!
To get you started we give you our best selling eBooks for FREE!
1. JPA Mini Book
2. JVM Troubleshooting Guide
3. JUnit Tutorial for Unit Testing
4. Java Annotations Tutorial
5. Java Interview Questions
6. Spring Interview Questions
7. Android UI Design
and many more ....
I agree to the Terms and Privacy Policy

Thank you!

We will contact you soon.

Tags
Docker
👁 Photo of Arun Gupta
Arun Gupta
December 2nd, 2014Last Updated: December 1st, 2014
1 50 1 minute read

Arun Gupta

Arun is a technology enthusiast, avid runner, author of a best-selling book, globe trotter, a community guy, Java Champion, JavaOne Rockstar, JUG Leader, Minecraft Modder, Devoxx4Kids-er, and a Red Hatter.
Subscribe

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

1 Comment
Oldest
Newest Most Voted
Santhosh Kumar Tekuri
11 years ago

“docker rm $(docker ps -aq)” does not remove all images.
it removes containers

0
Reply
Back to top button
Close
wpDiscuz