Docker
/Intermediate
Docker Architecture
Definition
Docker uses a client-server architecture. The Docker Client talks to the Docker Daemon, which does the heavy lifting of building, running, and distributing your Docker containers.
Explain Like I'm New
Like a restaurant. You are the Client (the customer). You tell the waiter what you want (`docker run`). The waiter takes the ticket to the Kitchen (the Docker Daemon). The Kitchen actually cooks the food (builds and runs the container).
Real World Example
When you type a command in your terminal, the Client translates it and sends an API request to the hidden background Daemon process. You can even configure a Client on your laptop to send commands to a Daemon running on a server 1,000 miles away.
Common Use Cases
- •Troubleshooting
- •Remote server management
Architecture & Flow
Interview Questions
basic
- When you type `docker run` in your terminal, are you interacting directly with the containers, or with the Docker Client?
intermediate
- What happens if the Docker Daemon process crashes or stops?