nerdexam
Docker

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.

Submitted by minji_kr· Apr 18, 2026Container Orchestration

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)
  • A
    92% (24)
  • B
    8% (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.

AYesCorrect

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.

BNo

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

#Docker Swarm Services#Service Inspection#Troubleshooting#Service Tasks

Community Discussion

No community discussion yet for this question.

Full DCA Practice