Docker Composeは、単一のYAMLファイルを使用してマルチコンテナアプリケーションを定義および実行するツールです。多くのdocker runコマンドを手動で実行する代わりに、すべてのサービス(アプリ、データベース、キャッシュ)をdocker-compose.ymlで説明し、1つのコマンドで一緒に起動します。
Composeが解決する問題
A real app often has MULTIPLE containers: a web app + a database + a cache + ...
→ manually running each with docker run (ports, networks, volumes, env, dependencies)
is tedious, error-prone, and hard to reproduce/share
→ Compose defines the WHOLE stack in one file → start it all with one command.
