Compose
dependency failed to start: container db is unhealthy – Docker COMPOSE_DEPENDS_ON_UNHEALTHY
L'errore compare quando un servizio secondario attende che il servizio primario raggiunga lo stato 'service_healthy', ma quest'ultimo fallisce l'healthcheck.
Cosa significa questo errore?
L'errore compare quando un servizio secondario attende che il servizio primario raggiunga lo stato 'service_healthy', ma quest'ultimo fallisce l'healthcheck.
Messaggio originale
dependency failed to start: container db is unhealthyContesto e parole chiave
Alias
- dependency failed to start unhealthy
Messaggi alternativi
- Dipendenza compose unhealthy
Prodotti
- Docker Engine / Docker Compose / BuildKit
Piattaforme
- Linux
- macOS
- Windows
Parole chiave
- Compose
- docker.compose.services-depends-on-unhealthy
- errore-docker-compose-depends-on-unhealthy
Cause possibili
Causa principale per Errore Docker Compose: Dependency failed to start: container is unhealthy
L'errore compare quando un servizio secondario attende che il servizio primario raggiunga lo stato 'service_healthy', ma quest'ultimo fallisce l'healthcheck.
molto comuneDiagnosi
Diagnostica di runtime per Errore Docker Compose: Dependency failed to start: container is unhealthy
Eseguire la verifica tramite CLI Docker.
Come leggere il risultato. Restituisce lo stato operativo del demone e dei servizi.
docker info && docker compose psRisoluzione
Risoluzione standard per Errore Docker Compose: Dependency failed to start: container is unhealthy
Esegui i comandi correttivi indicati per sanare la configurazione.
- Verificare lo stato del container o demone
- Applicare la configurazione corretta
- Riavviare con docker compose up -d
Domande frequenti
Come risolvere rapidamente Errore Docker Compose: Dependency failed to start: container is unhealthy?
L'errore compare quando un servizio secondario attende che il servizio primario raggiunga lo stato 'service_healthy', ma quest'ultimo fallisce l'healthcheck.
Approfondimenti
- Docker Official Documentation documentazione_ufficiale