# Troubleshooting & Logs

> A container starts and exits immediately (or keeps restarting). Walk me through how you would debug it.

Canonical: https://www.internhack.in/learn/interview/docker-containers/docker-logs-troubleshooting
Last updated: 2026-11-28

Difficulty: Beginner

## Question

A container starts and exits immediately (or keeps restarting). Walk me through how you would debug it.

*The full answer is for InternHack members. Open the page link above to read it.*

## Concepts covered

docker logs, Exit codes, docker inspect, OOMKilled, Entrypoint override

Previous: [Container Security](https://www.internhack.in/learn/interview/docker-containers/docker-security-best-practices) · Next: [Layering & Copy-on-Write](https://www.internhack.in/learn/interview/docker-containers/docker-storage-layers-copy-on-write) · [All of Docker & Containers](https://www.internhack.in/learn/interview/docker-containers)

## More Docker & Containers questions

- [.dockerignore](https://www.internhack.in/learn/interview/docker-containers/docker-ignore-file)
- [Exec Form vs. Shell Form](https://www.internhack.in/learn/interview/docker-containers/docker-exec-vs-shell-form)
- [Bind Mount Permissions](https://www.internhack.in/learn/interview/docker-containers/docker-bind-mount-permissions)
- [Cleanup Commands](https://www.internhack.in/learn/interview/docker-containers/docker-prune-cleanup)
- [Restart Policies](https://www.internhack.in/learn/interview/docker-containers/docker-container-restart-policy)
- [Inspecting Network](https://www.internhack.in/learn/interview/docker-containers/docker-inspect-network)

## Related

- [Learn](https://www.internhack.in/learn)
- [Interview Prep](https://www.internhack.in/learn/interview)
- [Docker & Containers](https://www.internhack.in/learn/interview/docker-containers)
