Scenario
A production Docker container exits unexpectedly with status "Exited (1)". The application had been running stable for days. The container is based on a custom image and uses default runtime settings.
Symptoms
docker psshows the container state as "Exited"docker logs <container>prints runtime errors like "exec: permission denied" or "OCI runtime create failed"- System logs (e.g.,
journalctl -u docker) show containerd or runc errors - Container fails to start even after manual restart
Diagnosis Steps
- Check container logs:
docker logs <container>for the most recent output - Inspect container state:
docker inspect <container> --format='{{json .State}}'to view exit code and error message - Check Docker daemon health:
systemctl status dockerorjournalctl -u docker -n 100 - Test basic runtime:
docker run --rm busybox echo testto verify the container engine works - Examine resource limits:
docker inspect <container> | jq '.[].HostConfig.Memory'to confirm memory and CPU settings - Verify image integrity:
docker run --rm <image> /bin/sh -c 'ls'to ensure the image is functional
Key Commands
docker logs <container>
docker inspect <container>
docker system df # Check disk usage
journalctl -u docker -n 50 --no-pager
cat /var/log/syslog | grep docker
Risk Controls
- Use
--restart=alwaysor--restart=on-failureto auto-restart containers - Set resource limits (
--memory,--cpus) to prevent OOM kills - Avoid using
--privilegedunnecessarily - Implement HEALTHCHECK instructions in Dockerfiles
Rollback Procedure
- If a new image version caused the issue, revert to the stable tag:
docker pull <image>:stablethen recreate the container - If configuration files were modified, restore from backup and restart
- Use
docker committo snapshot the current container state (temporary measure only)
Verification Steps
- After starting the container, tail logs:
docker logs -f <container> - Check container status:
docker psshould show "Up" - Perform application health checks (e.g., curl endpoints)
- Load test to ensure stability under expected traffic
When to Submit an OpsGlobal Ticket
- Basic troubleshooting fails and deep system-level analysis is needed
- Suspected kernel, storage driver, or network plugin (e.g., overlay) issues
- Need to modify Docker daemon configuration or upgrade Docker version
- Require professional assistance to recover data or optimize performance
Use cases
Useful for teams handling DevOps issues and needing a clear troubleshooting and delivery workflow.
Problem background
This post covers common Docker container runtime issues, including scenario, symptoms, diagnosis, commands, risk controls, rollback, verification, and when to submit an OpsGlobal ticket.
Troubleshooting steps
Confirm impact and recent changes, collect logs, configuration and metrics, then apply fixes from low to high risk.
Command examples
Replace sample resource names with real values and store passwords, tokens and keys in environment variables.
Risks
Before production changes, confirm backups, access boundaries, change windows and rollback paths.
Rollback plan
Keep original configuration and release versions; roll back config, images or database changes if metrics degrade.
Deliverables
Root-cause notes, key commands, remediation steps, verification results and follow-up recommendations.
Need help with a similar technical issue?
If your servers, Kubernetes, Docker, CI/CD, databases or monitoring systems have similar issues, submit logs and config files for remote diagnosis.