Common causes
- The application crashed on startup — check logs with docker logs CONTAINER_ID
- A missing environment variable, config file, or database connection the app requires
- A startup script or entrypoint script encountered an error and exited
- The application depends on another service that isn't ready yet (race condition in Compose)
How to fix it
- Read the container logs immediately: docker logs CONTAINER_ID (add --tail 100 for the last 100 lines)
- Run the container interactively to debug: docker run -it --entrypoint /bin/sh myimage
- Check required environment variables are set: docker run -e DB_URL=... myimage
- Use healthchecks and depends_on with condition in Compose to wait for dependencies
Example
$ docker run myapp
$ docker ps -a
CONTAINER ID STATUS
abc123def456 Exited (1) 3 seconds agoContainer started but immediately exited — docker logs will show the actual error
Browse more errors
The Developer Hub covers 150+ errors across Git, npm, Node.js, Python, TypeScript, and Docker — with plain-English explanations and fix steps.
