A container that says “Up” is not always a container that works. If the image defines a healthcheck, Docker keeps a separate verdict, and one command shows it.
Replace mycontainer with the name from docker ps:
docker inspect --format '{{.State.Health.Status}}' mycontainer
You get starting, healthy or unhealthy. docker ps shows the same thing in brackets behind the status, but the inspect form is useful in scripts and in a quick watch.
The caveat: a container without a healthcheck has no .State.Health at all, and the command fails with a template error. The container is fine, the image maker just did not define a check. You can add one yourself with healthcheck: in a Compose file.
Further reading: docker inspect (Docker docs), HEALTHCHECK (Dockerfile reference), On this site: docker logs –since 10m -f shows only what just happened, On this site: make depends_on wait for a healthy database, not just a started one, On this site: Guide: make Docker Compose wait until the database is really ready, not just started