View Container Logs
DK · Containerssyntax
docker logs [options] <container>example
docker logs web-api
docker logs -f --tail 50 web-api
docker logs --since 10m web-apioutput
Server listening on port 3000
GET /api/users 200 12msNote Use -f to follow in real time (like tail -f). Combine --tail and --since to avoid dumping thousands of lines. Logs persist until the container is removed.