Docker đóng gói app cùng runtime, dependencies và cấu hình cần thiết vào container image để chạy nhất quán giữa local, CI và production. Nó giảm lỗi kiểu chạy được trên máy tôi nhưng lỗi trên server.
Điểm cần hiểu trong interview: Docker không phải VM nhẹ. Container chia sẻ kernel host, khởi động nhanh hơn VM, nhưng vẫn cần quản lý image size, security, secrets, network, storage và lifecycle rõ ràng.
Docker packages an app with its runtime, dependencies and required configuration into a container image so it runs consistently across local, CI and production. It reduces environment drift.
Interview point: Docker is not just a lightweight VM. Containers share the host kernel and start faster than VMs, but still need clear management for image size, security, secrets, networking, storage and lifecycle.