Posts

Showing posts with the label Docker From Scratch

🐳 Docker From Scratch – Day 5: Docker Volumes & Persistent Storage Explained

🐳 Docker From Scratch – Day 5: Understanding Docker Volumes and Persistent Storage In the previous article, we explored Docker Networking and learned how containers communicate with each other using Bridge Networks, Port Mapping, and Docker DNS. By now, you can build Docker Images, create containers, expose applications to users, and even connect multiple containers together. However, another important question arises when working with real-world applications. What happens to the data inside a container when that container is deleted? If you are running a MySQL database inside Docker and accidentally remove the container, will your database still exist? Understanding the answer to this question introduces one of the most important concepts in Docker—Persistent Storage using Docker Volumes. Containers are designed to be lightweight, portable, and temporary. They can be created in seconds and removed just as quickly. This behavior is one of Docker's greatest strengths because ...

Docker From Scratch – Day 4: Docker Networking Explained with Real-World Examples

🐳 Docker From Scratch – Day 4: Understanding Docker Networking In the previous article, we learned how Docker Images are built using Dockerfiles and how containers are created from those images. At this stage, you can successfully build your own Docker Image and launch a container using commands such as docker build and docker run . However, another important question naturally arises. Once a container starts running, how does it communicate with the outside world? How does your browser access a web application running inside a container? How do multiple containers communicate with each other when building real-world applications? The answer lies in Docker Networking. Networking is one of the most fundamental concepts in Docker because almost every application requires communication. Whether it is a frontend connecting to a backend API, an application connecting to a database, or a microservice communicating with another service, networking is what makes these interactions poss...

Docker From Scratch – Day 3: Understanding Docker Images and Dockerfiles

🐳 Docker From Scratch – Day 3: Understanding Docker Images and Dockerfiles In the previous article, we installed Docker, explored Docker architecture, and ran our very first container. At this point, most beginners become comfortable running commands such as docker run nginx and docker ps . However, an important question still remains unanswered. Where does Docker actually get the Nginx application from? How does Docker know what software, libraries, and dependencies are required to run an application successfully? The answer lies in two of the most fundamental concepts in Docker: Docker Images and Dockerfiles. To understand Docker Images, imagine that you want to build a house. Before construction begins, an architect creates a blueprint. The blueprint contains all the information needed to construct the house, including dimensions, room layouts, electrical wiring, plumbing, and structural details. The blueprint itself is not a house, but it serves as a template from which mul...