DCA Communication & Stakeholder Relations 5 — Questions and Answers
Question 1: A project stakeholder needs a summary of all running services and their replica counts in a Docker Swarm. Which command provides this?
- docker service ls (Correct answer)
- docker ps --swarm
- docker stack ps
- docker node inspect
Correct answer: docker service ls
`docker service ls` lists all services in the Swarm along with their mode, replicas, and image.
Question 2: A DevOps engineer needs to communicate container resource usage to a finance stakeholder in real time. Which command streams live metrics?
- docker stats (Correct answer)
- docker inspect
- docker top
- docker events
Correct answer: docker stats
`docker stats` streams live CPU, memory, network I/O, and disk I/O metrics for running containers.
Question 3: An infrastructure team wants to ensure containers restart automatically after a host reboot. Which restart policy should they configure?
- --restart unless-stopped (Correct answer)
- --restart no
- --restart on-boot
- --restart always-reboot
Correct answer: --restart unless-stopped
`--restart unless-stopped` restarts the container on reboot unless it was manually stopped before the host went down.
Question 4: A compliance team asks how to confirm a Docker image has not been tampered with before deployment. What mechanism should you verify?
- Docker Content Trust (DCT) with image signing (Correct answer)
- Checking the image creation date only
- Comparing image names across registries
- Using docker diff after pulling
Correct answer: Docker Content Trust (DCT) with image signing
Docker Content Trust uses cryptographic signatures to verify image integrity and publisher authenticity before deployment.
Question 5: A team lead wants to share a multi-container application topology with new hires. Which artifact best communicates the full service relationship?
- The docker-compose.yml or stack file (Correct answer)
- A list of docker run commands
- The .dockerignore file
- The daemon.json configuration
Correct answer: The docker-compose.yml or stack file
A Compose or stack YAML file declaratively describes all services, networks, and volumes and their relationships in one place.
Question 6: A network administrator asks how to inspect the IP address of a running container without entering it. Which command retrieves this information?
- docker inspect --format '{{.NetworkSettings.IPAddress}}' <container> (Correct answer)
- docker ip <container>
- docker network info <container>
- docker ps --ip <container>
Correct answer: docker inspect --format '{{.NetworkSettings.IPAddress}}' <container>
`docker inspect` with a Go template format string extracts the container's IP address from its metadata.
Question 7: A stakeholder asks why two containers on the default bridge network cannot reach each other by name. What is the correct explanation?
- The default bridge network does not provide automatic DNS resolution; user-defined networks do (Correct answer)
- Docker disables DNS entirely on bridge networks
- Containers must share a volume to communicate by name
- Only Swarm overlay networks support any form of DNS
Correct answer: The default bridge network does not provide automatic DNS resolution; user-defined networks do
The default bridge network lacks the embedded DNS server that user-defined bridge networks provide for container name resolution.
A project stakeholder needs a summary of all running services and their replica counts in a Docker Swarm.
Which command provides this?