You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Problem checking healthy state - Docker docs php sample #2
I'm following the docker php sample guide but having problems checking the healthy state.
These are the lines in the docs:
healthcheck:
test: ["CMD", "/usr/local/bin/healthcheck.sh", "--su-mysql", "--connect", "--innodb_initialized"]
interval: 10s
timeout: 5s
retries: 5
But, unfortunatly, don't work. db-server is unhealthy and cannot let server to fully load and serve php.
Instead, if i change these lines for others:
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 10s
timeout: 5s
retries: 3
I can run the demo without problems.
After search i try many options, like in mariadb official docs are information about not using '--su-mysql' or using 'healthcheck.sh' without path, only sh file, but none of them work.
I cannot find why this fail and my attemp works.
Running on macos 13.6.6 with latest docker desktop in macbook air m1.
@Glifaus My containers are showing a healthy status. Maybe there was an error in the documentation at that time and it has since been fixed?
If the issue persists, look at output of docker inspect docker-php-sample-db-1 for the health check logs. There may be some useful information under State --> Health --> Log.
Activity
TimSpence commentedon Oct 23, 2024
@Glifaus My containers are showing a healthy status. Maybe there was an error in the documentation at that time and it has since been fixed?
If the issue persists, look at output of
docker inspect docker-php-sample-db-1for the health check logs. There may be some useful information under State --> Health --> Log.