Finally!! 🎉 I've completed the hands-on sessions with Docker, and I must say it’s been an amazing learning experience! I’ve picked up so much that’s useful for DevOps, and today’s task is the perfect way to wrap up this phase. 🙌
🔹 Today’s Task: Creating a Docker Cheat-Sheet
The goal for Day 20 is to compile everything I’ve learned about Docker and Docker Compose into a simple cheat-sheet. This cheat-sheet will include the most important commands and their explanations, making it a quick reference for me and the DevOps community. 😊
🔹 Docker Commands Cheat-Sheet
Container Management
Run a container:
docker run -d --name <name> <image>
Runs a container in the background.Stop a container:
docker stop <container_name>
Stops a container that’s running.List running containers:
docker ps
Shows all the containers currently running.List all containers:
docker ps -a
Displays every container, including stopped ones.Remove a container:
docker rm <container_name>
Deletes a container (must be stopped first).
Image Management
Pull an image:
docker pull <image>
Downloads a Docker image from Docker Hub.List images:
docker images
Shows all the images stored on your system.Remove an image:
docker rmi <image>
Deletes an image.
Volumes
Create a volume:
docker volume create <volume_name>
Makes a new volume for storing data.List volumes:
docker volume ls
Shows all existing volumes.Remove a volume:
docker volume rm <volume_name>
Deletes a volume.
Networking
List networks:
docker network ls
Displays all Docker networks.Create a network:
docker network create <network_name>
Creates a custom network.Inspect a network:
docker network inspect <network_name>
Gives details about a specific network.
🔹 Docker Compose Commands Cheat-Sheet
Basic Commands
Start services:
docker-compose up
Starts all the services listed in thedocker-compose.yml
file.Start in the background:
docker-compose up -d
Runs the services without tying up your terminal.Stop services:
docker-compose down
Stops and removes all containers, networks, and volumes created by Docker Compose.View logs:
docker-compose logs
Displays logs from all running services.Scale services:
docker-compose scale <service_name>=<number>
Adjusts the number of instances for a service.
🔹 Key Takeaways
Docker and Docker Compose make managing containers super simple.
Volumes are perfect for saving and sharing data between containers.
Docker networking is a great way to connect containers efficiently.
Creating this cheat-sheet has made me realize how much I’ve learned and how useful this will be for quick lookups.
Wrapping It Up
Day 20 has been all about reflecting on my Docker journey and creating something valuable to share. I’m thrilled to contribute this cheat-sheet to the DevOps community and hope it helps others in their learning too.
For more updates, follow me:
🔗 Hashnode: https://hashnode.com/@patilsiddharth0411
🔗 Medium: https://medium.com/@patilsiddharth0411
🔗 LinkedIn: www.linkedin.com/in/siddharthpatil112000
Big thanks to Train with Shubham for the motivation and support during this journey!
#90DaysOfDevOps #Docker #DockerCompose #DevOps #CloudComputing #LearningTogether #TechCommunity