LoginSignup
0
1

More than 3 years have passed since last update.

docker-composeで起動中のログにアタッチする方法

Posted at

docker-compose up -d $serviceName でコンテナを起動した時、logの出力を確認するには
docker-compose logs $serviceNameで確認できる
ただこの場合だとそれ以降のlogを取得するには再度同じコマンドを打たなければならない

docker-composeででタッチ起動したコンテナのlogを出力させ続けるには以下のコマンドを打つ

docker-compose logs -f $serviceName

-fまたは--followオプションをつけることでその後もログを出力させ続けることができる

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1