# docker logs: View Container Logs & Tail in CI

> How docker logs works: viewing stdout/stderr from a container, following, tailing, timestamps, and using it to debug CI failures.

Source: https://latchkey.dev/learn/command-reference/docker-logs-command  
Updated: 2026-06-25

See what a container printed to stdout and stderr.

docker logs retrieves the logs of a container - the output written to stdout and stderr. This page covers following, tailing, and the limits of the logs command.

## What it does

docker logs prints captured stdout/stderr for a container using the default json-file logging driver. It works on running and exited containers, which makes it the first tool for a crashed CI container.

## Common usage

```Terminal
docker logs web
docker logs -f web                     # follow
docker logs --tail 100 web
docker logs --since 5m --timestamps web
```

## Common errors in CI

"Error response from daemon: configured logging driver does not support reading" appears when the container uses a driver other than json-file or journald (e.g. awslogs). In that case read logs from the backend, not docker logs. If logs are empty, the process may write to a file rather than stdout - that is an app config issue, not a Docker bug; in containers, log to stdout/stderr.

## FAQ

### docker logs: View Container Logs & Tail in CI?

docker logs retrieves the logs of a container - the output written to stdout and stderr. This page covers following, tailing, and the limits of the logs command.

### What it does?

docker logs prints captured stdout/stderr for a container using the default json-file logging driver. It works on running and exited containers, which makes it the first tool for a crashed CI container.

### Common errors in CI?

"Error response from daemon: configured logging driver does not support reading" appears when the container uses a driver other than json-file or journald (e.g. awslogs). In that case read logs from the backend, not docker logs.

---

Latchkey runs CI/CD that repairs its own failures. Agent entry points: https://latchkey.dev/agent.txt, https://latchkey.dev/openapi.json, https://latchkey.dev/llms.txt
