#90DaysOfDevOps Challenge - Day 20 - Docker for DevOps Engineers Wrap up

Cloud Engineer and DevOps enthusiast, just talking about AWS, Docker, Linux, Kubernetes, Python, and automation.
Search for a command to run...

Cloud Engineer and DevOps enthusiast, just talking about AWS, Docker, Linux, Kubernetes, Python, and automation.
No comments yet. Be the first to comment.
The #90DaysOfDevOps Challenge is a dedicated initiative aimed at promoting continuous learning and skill development in the field of DevOps over a 90-day period.
Running your own home lab used to mean expensive hardware, complex networking, and hours of manual configuration. This project changes that. With a single Raspberry Pi, Docker Compose, and a few hundr

Welcome to an advanced hybrid directory demo where we'll guide you through setting up a hybrid environment, connecting to simulated on-premises infrastructure, creating a managed Microsoft AD within AWS, establishing a two-way forest trust, and integ...

Hello DevOps Community! Today marks the completion of the #90DaysOfDevOps Challenge, and it's a moment to reflect on the journey we've undertaken together. Throughout this period, I've engaged with various technologies, refining my skills in the DevO...

In a modern cloud infrastructure setup, creating a robust and scalable 2-tier architecture is essential. Such an architecture helps meet the demands of your applications while ensuring repeatability, reliability, and security. In this article, we'll ...

Welcome to Part 4 of my series on building a comprehensive CI/CD pipeline in AWS. In this article, I will explore AWS CodePipeline, a powerful service for building and deploying applications in a continuous integration and continuous delivery (CI/CD)...

Welcome to Day 20 of the #90DaysOfDevOps challenge. In today's article, we will wrap up our exploration of Docker for DevOps Engineers and provide you with a handy Docker cheat sheet filled with examples and tips. Let's dive in.
docker pull <image_name>:<tag>: Pull an image from Docker Hub.
docker images: List downloaded images.
docker rmi <image_id>: Remove an image.
docker run <image_name>: Run a container from an image.
docker run -d <image_name>: Run a container in detached mode.
docker ps: List running containers.
docker ps -a: List all containers (including stopped ones).
docker stop <container_id>: Stop a running container.
docker rm <container_id>: Remove a container.
docker-compose up: Start the containers defined in the Docker Compose file.
docker-compose down: Stop and remove the containers defined in the Docker Compose file.
docker volume create <volume_name>: Create a new volume.
docker volume ls: List all volumes.
docker volume inspect <volume_name>: Display detailed information about a volume.
docker volume rm <volume_name>: Remove a volume.
docker network create <network_name>: Create a new network.
docker network ls: List all networks.
docker network inspect <network_name>: Display detailed information about a network.
docker network rm <network_name>: Remove a network.
docker logs <container_id>: Fetch the logs of a container.
docker exec -it <container_id> <command>: Execute a command inside a running container.
docker inspect <container_id>: Display detailed information about a container.
docker stats: Display real-time CPU, memory, and network usage of containers.
docker system df: Show Docker disk usage.
docker system prune: Remove unused data such as stopped containers, unused networks, and dangling images.
docker image prune: Remove unused images.
docker container prune: Remove stopped containers.
docker login: Login to a Docker registry.
docker logout: Log out from a Docker registry.
docker push <image_name>:<tag>: Push an image to a Docker registry.
Use descriptive names for containers, images, and volumes.
Keep your Dockerfile and docker-compose.yml files in version control for easier management and collaboration.
Use environment variables in your Docker Compose files for dynamic configurations.
Regularly clean up unused containers, images, and volumes to free up disk space.
Explore Docker Hub and official repositories for pre-built images.
Congratulations on completing Day 20 of the #90DaysOfDevOps challenge. Throughout this article, I have provided you with a Docker cheat sheet containing essential commands and tips for effective Docker usage. By referencing this cheat sheet, you'll be able to streamline your Docker workflows and work more efficiently as a DevOps Engineer.
Stay tuned for Day 21, where we will review the Docker Important interview questions. Stay tuned!