bhb
bhb

Reputation: 2561

How to check the docker-compose logs when started with detached mode?

I am running 2 apps with docker-compose. How to see the logs when I start them in detached mode like

docker-compose up -d

Where do I access the logs for docker-compose output?

Upvotes: 1

Views: 447

Answers (2)

D. Vinson
D. Vinson

Reputation: 1158

To view all logs:

docker-compose logs

To view and follow all logs:

docker-compose logs -f

View last 50:

docker-compose logs --tail 50

View last 10 and follow:

docker-compose logs --tail 10 -f

Upvotes: 3

Prithwee Das
Prithwee Das

Reputation: 5226

To get the logs, cd in to the directory where the docker-compose.yml is and then use docker-compose logs -f -t

Upvotes: 1

Related Questions