DCA Financial Management & Budgeting 4 — Questions and Answers
Question 1: A company runs 200 microservices in Docker Swarm. Resource limits are not set on any service. What is the primary financial risk?
- Services will not start without resource limits
- A noisy-neighbor container can exhaust host resources, causing unplanned scaling costs (Correct answer)
- Docker Swarm requires paid licensing without resource limits
- Images will fail to pull from the registry
Correct answer: A noisy-neighbor container can exhaust host resources, causing unplanned scaling costs
Without limits, a single runaway container can consume all host resources, forcing emergency scale-outs and unexpected cloud spend.
Question 2: Which flag in 'docker service create' sets the guaranteed CPU reservation for each service replica in Docker Swarm?
- --limit-cpu
- --reserve-cpu (Correct answer)
- --cpu-shares
- --cpus
Correct answer: --reserve-cpu
--reserve-cpu reserves the specified number of CPU cores on the host node for scheduling purposes in Swarm.
Question 3: Which Docker multi-stage build benefit most directly reduces registry storage costs?
- Faster build times
- Smaller final images containing only production artifacts (Correct answer)
- Parallel layer downloads
- Automatic image signing
Correct answer: Smaller final images containing only production artifacts
Multi-stage builds discard build tools and intermediate files, producing smaller final images that cost less to store and transfer.
Question 4: Which 'docker system df' output column tells you how much disk space could be reclaimed by pruning?
- SIZE
- ACTIVE
- RECLAIMABLE (Correct answer)
- SHARED SIZE
Correct answer: RECLAIMABLE
The RECLAIMABLE column shows how much disk space would be freed if unused images, containers, and volumes were removed.
Question 5: You want to limit the maximum number of processes a container can spawn to prevent fork-bomb attacks that cause unplanned CPU costs. Which flag do you use?
- --ulimit nofile
- --pids-limit (Correct answer)
- --cpu-quota
- --blkio-weight
Correct answer: --pids-limit
--pids-limit restricts the total number of processes allowed inside a container, preventing runaway process creation.
Question 6: A financial services company needs to audit which teams are consuming the most Docker registry storage. Which Docker Hub feature supports organizational cost tracking?
- Docker Hub Personal accounts
- Docker Hub Teams with repository-level usage metrics per namespace (Correct answer)
- Docker Desktop resource dashboards
- Docker Content Trust auditing
Correct answer: Docker Hub Teams with repository-level usage metrics per namespace
Docker Hub Teams and Organizations feature provides namespace isolation and usage visibility, enabling per-team storage accountability.
Question 7: Your CI pipeline pulls the same base image hundreds of times per day from Docker Hub. Which solution reduces both pull latency and potential rate-limit costs?
- Switch all images to scratch base
- Set up a Docker Hub pull-through cache or mirror registry (Correct answer)
- Use --no-cache on all docker build commands
- Increase runner machine CPU to speed up pulls
Correct answer: Set up a Docker Hub pull-through cache or mirror registry
A pull-through cache stores images locally on first pull and serves subsequent requests without hitting Docker Hub, avoiding rate limits.
A company runs 200 microservices in Docker Swarm.
Resource limits are not set on any service.
What is the primary financial risk?