up

Usage: up [options] [SERVICE...]

Options:
-d                     Detached mode: Run containers in the background,
                       print new container names.
--no-color             Produce monochrome output.
--no-deps              Don't start linked services.
--force-recreate       Recreate containers even if their configuration and
                       image haven't changed. Incompatible with --no-recreate.
--no-recreate          If containers already exist, don't recreate them.
                       Incompatible with --force-recreate.
--no-build             Don't build an image, even if it's missing
-t, --timeout TIMEOUT  Use this timeout in seconds for container shutdown
                       when attached or when containers are already
                       running. (default: 10)

サービス用のコンテナの構築、作成、起動、アタッチを行います。

既に実行している場合は、このコマンドによってリンクされているサービスも起動します。

docker-compose up コマンドは各コンテナの出力を統合します。コマンドを終了(exit)すると、全てのコンテナを停止します。 docker-compose up -d で実行すると、コンテナをバックグラウンドで起動し、実行し続けます。

もしサービス用のコンテナが存在している場合、かつ、コンテナを作成後にサービスの設定やイメージを変更している場合は、 docker-compose up -d``を実行スト、 設定を反映するためにコンテナを停止・再作成します(マウントしているボリュームは、そのまま保持します)。Compose が設定を反映させないようにするには、 ``--no-cecreate フラグを使います。

もしも Compose で処理時、強制的に全てのコンテナを停止・再作成するには --force-recreate フラグを使います。