ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 171 - DCA discussion

Report
Export

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 five seconds apart. If the test fails, the container will be restarted three times before it gets rescheduled.

A.

Yes

Answers
A.

Yes

B.

No

Answers
B.

No

Suggested answer: B

Explanation:

The statement is incorrect about the health check definition based on the Docker Compose file provided. According to the Docker documentation, a health check can be specified in a Dockerfile or a Docker Compose file to tell Docker how to test a container to check that it is still working. This can be done with options such as interval, timeout, and retries. In this case, the health checks are not set to test five seconds apart but rather ten seconds apart (interval: 10s). The retries: 3 indicates that if the health check fails, Docker will try three times before considering the container unhealthy1.

asked 08/11/2024
Daniel Bucknor-Ankrah
41 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first