
30 DCA Questions #2: Continue Your Training
Second set of 30 questions to prepare for the Docker Certified Associate exam. Interactive DOMC format, new questions and advanced pitfalls.
Finished 30 DCA Questions #1? Perfect, here's the sequel!
This second set of 30 questions covers more advanced aspects of the 6 exam domains. Same DOMC format: one option at a time, YES or NO, no going back.
Orchestration (25% of the exam)#
Advanced questions on Docker Swarm: rolling updates, constraints, labels and error handling.
Additional Questions - Orchestration#
Q6: How do you limit a service to one replica per node?
Use global mode instead of replicated:
docker service create --mode global --name monitoring prometheusIn global mode, Swarm deploys exactly one task on each node that matches the constraints.
Q7: What's the difference between docker service update --force and docker service rollback?
--forceredeploys the current configuration (useful for refreshing containers)rollbackrestores the previous configuration (undoes recent changes)
Q8: How do you view logs from all replicas of a service?
docker service logs myservice
# Or with timestamps and following new logs
docker service logs -f --timestamps myserviceImages & Registry (20% of the exam)#
Advanced questions on Dockerfiles, build cache, and registries.
Common pitfall: COPY vs ADD
Always use COPY unless you need automatic tar extraction. ADD can have unexpected behaviors (URL download, extraction). COPY is more explicit and predictable.
Additional Questions - Images#
Q5: How do you build an image for a different architecture?
# Build for ARM64 from x86
docker buildx build --platform linux/arm64 -t myimage:arm64 .Q6: Which command removes unused images?
docker image prune # Dangling images (without tag)
docker image prune -a # All images not used by a containerInstallation & Configuration (15% of the exam)#
Questions about logging drivers, daemon and backups.
Additional Questions - Configuration#
Q4: How do you change Docker's storage directory?
In /etc/docker/daemon.json:
{
"data-root": "/mnt/docker-data"
}Then restart Docker. Don't forget to migrate existing data!
Q5: How do you limit default container resources?
{
"default-ulimits": {
"nofile": { "Name": "nofile", "Hard": 64000, "Soft": 64000 }
}
}Networking (15% of the exam)#
Advanced questions about overlay networks, DNS and troubleshooting.
Additional Questions - Networking#
Q4: How do you debug network issues between containers?
# Check connectivity
docker exec container1 ping container2
# Inspect network configuration
docker inspect --format='{{json .NetworkSettings.Networks}}' container1
# View network endpoints
docker network inspect mynetworkQ5: Why can't a container resolve another container's name?
Possible causes:
- Containers aren't on the same network
- Docker internal DNS is disabled (host network)
- Target container doesn't have an exposed service
Security (15% of the exam)#
Advanced questions about secrets, capabilities and best practices.
Security pitfall: --privileged
Never use --privileged in production unless absolutely necessary. This flag disables all security protections. Prefer adding only necessary capabilities with --cap-add.
Additional Question - Security#
Q4: How do you scan an image for vulnerabilities?
# With Docker Scout (built-in)
docker scout cves myimage:v1
# With Trivy (popular external tool)
trivy image myimage:v1Storage (10% of the exam)#
Advanced questions about volumes and persistence strategies.
Additional Questions - Storage#
Q3: What's the difference between -v and --mount?
| Aspect | -v / --volume | --mount |
|---|---|---|
| Syntax | Compact: -v src:dst:opts | Explicit: --mount type=...,source=...,target=... |
| Non-existent bind mount | Creates the folder | Error |
| Recommendation | Legacy | Preferred for clarity |
Q4: How do you share a volume between multiple Swarm services?
# In docker-compose.yml
volumes:
shared-data:
driver: local
services:
app1:
volumes:
- shared-data:/data
app2:
volumes:
- shared-data:/dataNote: For true distributed sharing, use an external volume driver (NFS, GlusterFS, etc.).
Summary#
You've just completed 30 DCA Questions #2! With the 30 questions from the first article, you've now seen 60 questions covering all exam domains.
Key Points from This Set#
- Advanced orchestration: rollback, failure-action, constraints with labels
- Images: exec vs shell form for ENTRYPOINT, buildx for multi-arch
- Networking: Swarm ports (2377, 7946, 4789), host vs ingress mode
- Security: docker trust sign, --cap-drop ALL
Next Steps#
- Review 30 DCA Questions #1 if you haven't already
- Practice the commands in a real Docker environment
- Check out our article Preparing for DCA in 6 Weeks for a structured plan
Good preparation, and good luck on your DCA exam!