Health check instruction from docker image is not mapped to cycle
Docker image has a HEALTHCHECK instruction in it.
HEALTHCHECK --interval=30s --timeout=5s --retries=5 CMD ["grpc_health_probe", "--addr=:9000"]
But seems it is not picked up by cycle to fill in the health check policy for container.
As a workaround, we are explicitly setting the containers.<container>.config.deploy.health_check
in cycle stack json/yaml.
health_check:
command: "grpc_health_probe --addr=:9000"
delay: "30s"
interval: "30s"
restart: true
retries: 5
timeout: "5s"
Hey Jure great question.
Cycle does not support the HEALTHCHECK directive as defined in the Dockerfile. While Cycle supports many of the directives in Dockerfiles like VOLUMES, etc, that specific one is meant to work with Docker directly and as Cycle doesn't use Docker under the hood, our implementation is slightly different.
The way you have implemented this in the stack looks to be correct. You can also define this directly on a container config if you're not using the stack, but you cannot set it during container create if you're using the container create in the portal.
I hope this helps clear things up, please as a follow up if you have any outstanding questions :)