ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 141 - 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 lest for app health ten seconds apart. Three failed health checks transition the container into 'unhealthy' status.

A.

Yes

Answers
A.

Yes

B.

No

Answers
B.

No

Suggested answer: A

Explanation:

The statement is correct. In the provided Docker Compose file, a health check is defined for the service ''app''. It uses curl to perform a health check on the application every 10 seconds (as specified by the ''interval'' parameter). If it fails three times (as specified by the ''retries'' parameter), then the container is marked as unhealthy.A health check is a way of checking the health of a running container and applying actions based on the result1.It can be used to monitor the status of the service and restart the container if it becomes unhealthy2.Reference:

Compose file version 3 reference | Docker Docs

Docker Compose & Health Checks -- Gabriel's World

asked 08/11/2024
THARINDU AMARASINGHE
30 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first