Interview Prep/Docker/Limits, logging, health checks and restarts

`docker logs` is empty but the app is running.

BeginnerScenarioLimits, logging, health checks and restarts
Answer

Situation read → The app logs to a file, not stdout/stderr, or the logging driver is not json-file/local.

What I'd do → docker inspect -f '{{.HostConfig.LogConfig.Type}}' c; docker exec c ls -l /var/log. Redirect to stdout (ln -sf /dev/stdout /var/log/app.log) or configure app logging.

Why → docker logs reads only for drivers that support it (e.g. not syslog before newer dual-logging).

Interview tip → Dual logging in 20.10+ keeps docker logs working with remote drivers.

All Docker questions Roadmap: Docker & containers

More on Limits, logging, health checks and restarts