Basic Commands of Docker

 





1. docker –version --> to check docker version 

 2. docker version --> to check client and host version 

 3. docker container run httpd --> create container foreground 

 4. docker container run –d httpd --> create container byground

 5. docker container ls --> to show only running container 

 6. docker container la –a --> to show all container 

 7. docker ps --> to show container 

 8. docker container stop container name --> to stop container

 9. docker container start container name --> to statr container 

 10. docker container rm container name --> to delete stop container 

 11. docker container rm –f container name --> to delete running container 

 12. docker container run –d –it ubuntu --> to create OS image

 13. docker image ls --> to show images 

 14. docker container run –d –name team httpd --> naming the container 

 15. docker container exec –it container name bash --> go inside the container 

 16. 17. exit --> coming out of the container docker container inspect container name --> view all details of the container 

 18. docker container stats --> to check container stats (memory usage , CPU etc.)

 19. 20. docker container pause --> to pause the container docker container unpause --> to unpause the container 

 21. docker container logs container name --> to check container’s logs 

 22. docker container prune --> to delete all stop containers
 
 23. docker container run –d httpd 80:80 httpd --> get the port mapping

Comments

Popular posts from this blog

User Management in Linux – Complete Notes for Beginners

DevOps Roadmap 2026 – Your Complete Beginner-to-Expert Guide

What is Public Subnet in AWS? Step-by-Step Explanation with Example