Commands.app

docker logs

Container Management

Fetch logs from a container

Options & Flags
Available options for this command
-f

Follow log output

--tail N

Show last N lines

Examples
Common usage examples

Show container logs

docker logs mycontainer

Follow logs in real-time

docker logs -f mycontainer

Show last 100 lines

docker logs --tail 100 mycontainer
Related Commands
You might also find these useful