Questions tagged [docker-healthcheck]

7 questions
3
votes
1 answer

Set the 'start-interval' of a healthcheck in docker-compose.yml

I am deploying some services using Docker Compose. I want to check that my containers are healthy using healthcheck (see Docker Compose documentation here). Let's consider the following code. It works fine, except when I uncomment the last line: #…
scūriolus
  • 657
  • 2
  • 5
  • 15
1
vote
1 answer

Docker Compose healthcheck: service never becomes unhealthy

I have a compose file with three services (database, backend and frontend). Backend depends on database being healthy, and frontend depends on backend being healthy. Database (postgres) checks for its own health using pg_isready and backend…
Joseph Sabido
  • 43
  • 2
  • 6
1
vote
0 answers

Azure App Service Container HealthCheck - small

I have a Azure App Service Container failing on the healthcheck. My docker is a very light Alpine, but I do have netcat The app service fails because port 80 is not responding on the container. The container is not a web server. My Dockerfile:…
jlo-gmail
  • 4,453
  • 3
  • 37
  • 64
0
votes
0 answers

Docker Swarm mode running many services with healthcheck eventhough replicas=1

I have a single node with Docker in Swarm mode. I deploy a stack with a service with this config: deploy: mode: replicated replicas: 1 update_config: parallelism: 1 order: start-first I hoped it deploys an…
Jasper
  • 478
  • 6
  • 19
0
votes
1 answer

docker-compose mysql health check inline complex command

docker-compose mysql health check inline complex command: serivces: mysql: image: mysql:latest volumes: - ./init-data:/docker-entrypoint-initdb.d healthcheck: test: - CMD-SHELL - if [[ -z "$(ls -A…
eastwater
  • 4,624
  • 9
  • 49
  • 118
0
votes
0 answers

docker inspect --format "{{json .State.Health }}" keeps showing status unhealthy, what's the criteria to determine the status healthy/unhealthy?

I am running this in Azure DevOps pipeline. I have a healthcheck in my docker compose like so: healthcheck: test: "ps aux | grep 'dotnet test' | grep -v grep | tr -d '\n' && exit 0 || exit 1" #check if dotnet test process is running …
Rosdi Kasim
  • 24,267
  • 23
  • 130
  • 154
0
votes
0 answers

Docker health check targeting anothern container?

I have a docker container service-1 that does not support curl or wget or ping. The container does start up a service which is available on localhost:8080 when ready. As I cannot write a curl health check for this container (due missing command), I…
Herr Derb
  • 4,977
  • 5
  • 34
  • 62