Docker 是一個容器化 (containerization) 平台 — 將應用程序與其所有依賴項一起打包到一個便攜式容器中,可在任何地方一致地運行。它通過使環境可復現來解決經典的「我的機器上能運行」問題。
問題:不一致的環境
WITHOUT containers:
→ an app works on the developer's machine but fails in test/production
→ different OS, library versions, configs, missing dependencies → "works on my machine"
→ setting up environments is manual, error-prone, and inconsistent
