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.
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)- A4% (1)
- B96% (22)
Why each option
The `docker inspect http` command is used for inspecting individual Docker objects like containers or images, not Docker Swarm services.
`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.
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
Community Discussion
No community discussion yet for this question.