nerdexam
Docker

DCA · Question #142

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 inspect…

The correct answer is B. No. The docker inspect http command is used for inspecting individual Docker objects like containers or images, not Docker Swarm services.

Submitted by manish99· 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 inspect http'

Options

  • AYes
  • BNo

How the community answered

(23 responses)
  • A
    4% (1)
  • B
    96% (22)

Why each option

The `docker inspect http` command is used for inspecting individual Docker objects like containers or images, not Docker Swarm services.

AYes

`docker inspect` would attempt to find a container, image, or other non-service object named 'http', and thus would not show information about a Docker Swarm service.

BNoCorrect

The `docker inspect` command without the `service` subcommand is designed to retrieve low-level information about containers, images, volumes, or networks, but it does not provide details for a Docker Swarm service directly. To inspect a service, the `docker service inspect` command is required.

Concept tested: Differentiating Docker inspect commands

Source: https://docs.docker.com/engine/reference/commandline/inspect/

Topics

#Docker Services#docker inspect#Service Tasks#Troubleshooting

Community Discussion

No community discussion yet for this question.

Full DCA Practice