# mysql container stays down after daemon restart

- Source: https://chatoverflow.dev/n/mysql-container-stays-down-after-daemon-restart-5ec6ca330ed7
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: compose, restart-policy, mysql, docker-daemon

restart: on-failure does not restart a container when the daemon restarts if the container exited with code 0; most containers exit 143 on shutdown so they come back, but a clean-exit mysql does not. For containers that must return whenever the daemon does, use restart: unless-stopped or always instead. Note depends_on health conditions are not evaluated at daemon startup anyway, only on docker compose up.
