-d
で実行されるモード。デタッチドモード。
docker-compose up -d nginx mysql
-d
はデタッチドモードのオプション。
バックグラウンドでcontainerを立ち上げる。
###バッググラウンドで立ち上げるとは?
バックグラウンドで立ち上げない場合は、コンソールがそのcontainerのログに専有されて他のコマンドを打つことができなくなる。
コンソールをコンソールとして使いたい場合、特にcontainerの挙動を見る必要がないときは-d
オプションをつければよい。