`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.
More on Limits, logging, health checks and restarts
A Java container is OOM-killed at 512 MB. Why isn't the heap the whole story?IntermediateHow do you cap CPU and memory for a container and what happens on exceed?BeginnerLatency spikes though CPU usage looks low (50%).AdvancedConfigure log rotation globally.BeginnerShip container logs to a central system.IntermediateDefine a good restart policy for a production service.Beginner