nerdexam
Docker

DCA · Question #97

The following Docker Compose file is deployed as a stack: Is this statement correct about this health check definition? Solution: Health checks test for app health ten seconds apart. Three failed…

The correct answer is A. Yes. This statement accurately describes the effect of a Docker Compose health check configuration with a 10-second interval and 3 retries.

Submitted by carter_n· Apr 18, 2026Container Orchestration

Question

The following Docker Compose file is deployed as a stack:

Is this statement correct about this health check definition? Solution: Health checks test for app health ten seconds apart. Three failed health checks transition the container into "unhealthy" status.

Exhibit

DCA question #97 exhibit

Options

  • AYes
  • BNo

How the community answered

(62 responses)
  • A
    95% (59)
  • B
    5% (3)

Why each option

This statement accurately describes the effect of a Docker Compose health check configuration with a 10-second interval and 3 retries.

AYesCorrect

A Docker Compose health check defined with an `interval: 10s` means checks occur ten seconds apart. If `retries: 3` is also configured, the container will be marked 'unhealthy' after three consecutive failed health checks.

BNo

The description correctly interprets the common `interval` and `retries` parameters within a Docker Compose health check definition.

Concept tested: Docker Compose health check parameters

Source: https://docs.docker.com/compose/compose-file/05-services/#healthcheck

Topics

#Docker Compose#Health check#Container health#Service definition

Community Discussion

No community discussion yet for this question.

Full DCA Practice