Docker Commands Basic To Intermidiate↓

Aryan KaleAryan Kale
1 min read

Introduction

Docker commands are the building blocks for managing containers efficiently. This are Basic to Intermidiate Commands , providing real-time examples for a comprehensive understanding.


Basic Container Management 🚢

1. Create Docker Image

docker images [OPTIONS] [REPOSITORY[:TAG]]

2. Show Running Containers

docker ps

3. Start a Docker Container

docker start <container id>

4. Stop a Docker Container

docker stop <container id>

5. Run a Docker Image

docker run <image name>

6. View Console Output

docker logs <container id>

Intermediate Container Operations 🔄

7. Delete Stopped Containers

docker rm $(docker ps -a -q)

8. Delete All Images

docker rmi $(docker images -q)

9. SSH into a Running Container

sudo docker exec -it <container name> bash

10. Map Host Port to Container Port

docker run -p <host port>:<container port> <image name>

Conclusion

This extended Docker cheat sheet covers a range of commands, from basic container management to Intermidiate Dockerfile configurations and real-world use cases. Whether you are a beginner or an experienced DevOps engineer, these commands and examples will enhance your Docker proficiency.

Happy Learning! 🐳🚀

2
Subscribe to my newsletter

Read articles from Aryan Kale directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Aryan Kale
Aryan Kale

Hi, I am Aryan Kale, a Java Backend Developer, passionate about developing production-ready applications while building and working with teams of Software Developers, aspiring to become a Technical Architect.After developing Applications in a product based startup and a mid-size service-based firm, I gained experience in Java, Python, SQL, DevOps, Docker, AWS, Leadership Skills, and Soft skills.Getting the responsibility of working with a team of enthusiastic software developers was one of the biggest achievements which improved my communication skills.I believe continuous learning and development to keep myself up to date and up-skilled is the solution to the modern-day application development for customers. Reach out to get modern-day solution for your dream project. Thank You...