Interview Prep/Docker/Containers that exit, crash or misbehave

Container time/zone is wrong in logs.

BeginnerTroubleshootingContainers that exit, crash or misbehave
Answer

Likely causes → Containers default to UTC and slim images lack tzdata.

Diagnose → docker exec c date; docker exec c ls /usr/share/zoneinfo | head.

Fix → Install tzdata and set TZ, or mount /etc/localtime:ro.

Prevent → Log in UTC and convert at display time.

All Docker questions Roadmap: Docker & containers

More on Containers that exit, crash or misbehave