DCA · Question #141
You created a new service named 'http' and discover it is not registering as healthy. Will this command enable you to view the list of historical tasks for this service? Solution: 'docker service…
The correct answer is A. Yes. The docker service inspect http command provides comprehensive details about a Docker service, including a list of its associated tasks, which can encompass historical task information.
Question
You created a new service named 'http' and discover it is not registering as healthy. Will this command enable you to view the list of historical tasks for this service? Solution: 'docker service inspect http'
Options
- AYes
- BNo
How the community answered
(26 responses)- A92% (24)
- B8% (2)
Why each option
The `docker service inspect http` command provides comprehensive details about a Docker service, including a list of its associated tasks, which can encompass historical task information.
The `docker service inspect` command returns detailed JSON output for a Docker service, which includes a `Tasks` field listing the service's tasks. This list contains information about current, failed, and completed tasks, thereby providing access to historical task data relevant for debugging an unhealthy service.
The `docker service inspect` command is specifically designed to provide detailed information about a service's state and history, including its tasks.
Concept tested: Docker service inspection and task history
Source: https://docs.docker.com/engine/reference/commandline/service_inspect/
Topics
Community Discussion
No community discussion yet for this question.