Exam Information
Free practice questions with explanations
Docker DCA Practice Questions
Answer a question to see the correct answer and the explanation, or click Show answer. Newest questions first.
- Questions
- 12
- Answered
- 0
- Correct
- 0
- Score
- -
-
1 Question 1 Single choice Orchestration
A fintech team runs a three-manager Docker Swarm cluster. During a planned network maintenance window, two managers become unreachable at the same time. The remaining manager reports that the swarm is no longer accepting service updates, and the on-call engineer must restore the ability to deploy changes without rebuilding the cluster or losing service state. Which action is the correct FIRST step?
Correct Answer: AExplanationSwarm uses Raft consensus, which needs a majority of managers (quorum) to commit changes. With three managers, losing two leaves one, so the swarm cannot write state. Promoting a healthy worker with docker node promote adds a manager and can restore a majority, which is the least disruptive path that keeps existing service state. Forcing a new cluster discards the quorum membership and is a recovery of last resort. Restarting workers does not affect manager elections, and redeploying stacks cannot be committed without quorum in the first place.
-
2 Question 2 Single choice Image Creation, Management, and Registry
A build team needs to reduce a Docker image that currently has 40 layers, several of which were created by deleting temporary files in later RUN instructions. The image must be pushed to an internal registry that enforces a single-layer policy for a regulated base image, and the engineers want to keep the same image name and tag. Which approach meets these requirements with the least rework?
Correct Answer: CExplanationA flattened single-layer image can be produced by exporting a container's filesystem with docker export and importing it with docker import, which yields one layer and allows the original name and tag to be reapplied. The stem says the existing image must be modified, so rebuilding is not the least-rework route. The --squash option is an option for docker build and does not apply to an already-built image. Pruning removes unused images and does not alter layer structure of a tagged image. Saving and loading preserves the layer structure, so the image would still have 40 layers.
-
3 Question 3 Single choice Installation and Configuration
A platform team manages Docker Engine on 60 Ubuntu hosts. Application containers ship logs in JSON format, and the security team now requires that logs from every container be forwarded to a central Splunk HTTP Event Collector without any change to the application images. Disk space on the hosts is limited, so local log files must not grow without bound. Which daemon-level configuration best meets these requirements?
Correct Answer: BExplanationThe Splunk logging driver is configured in /etc/docker/daemon.json as the default-log-driver, with the HEC URL and token passed as log options, so containers need no changes. Because the splunk driver does not keep local copies, the team also needs local retention controls; the stem's disk constraint is addressed by keeping a bounded local log alternative. Among the choices, the daemon-level splunk configuration with a bounded local option is the only one that forwards every container without image changes. A sidecar per application requires changing deployments, and the local driver with logrotate does not forward to Splunk. Syslog forwarding depends on an extra host component that the stem does not mention and does not provide native HEC delivery.
-
4 Question 4 Multiple choice Networking
A retail company runs a Docker Swarm service named checkout with three replicas across worker nodes in two data centres. Clients outside the cluster must reach the service on port 8443, and the operations team wants a request sent to any node to be routed to a healthy task regardless of where that task runs. The company also needs an alternative configuration for a single monitoring agent that must bind directly to port 9100 on each node it runs on and must not pass through the routing mesh. Which two configurations meet these requirements? (Choose two.)
Correct Answer: C, DExplanationIngress mode uses the swarm routing mesh, so any node accepting traffic on 8443 forwards it to a healthy checkout task, which matches the requirement for location-independent routing. Host mode binds the port directly on the node where a task runs, which suits a global monitoring agent that must avoid the mesh on 9100. Host mode for checkout would only serve traffic on nodes that run a task, breaking the any-node requirement. Ingress for the agent would route traffic through the mesh, violating the direct-binding need. The --network host flag applies to standalone containers and is not a swarm service publishing configuration.
-
5 Question 5 Drag and drop Security
A healthcare provider runs Docker Engine on hosts and a Docker Swarm cluster. An auditor asks the team to match each security control to the element of the default or enforced Docker security posture it relies on. Match each control to its correct element.
Drag each item onto its matching target. On a phone: tap an item, then tap a target.
Scanning image layers for known vulnerable packages before deploymentRestricting which users can deploy services to a specific UCP collectionEncrypted communication between swarm managers and workers by defaultVerifying that an image tag was published by an authorised signerImage vulnerability scanning in the registryRole-based access control in UCPMutual TLS between swarm nodesHost-level cgroups limitsOverlay network VXLAN encapsulationDocker Content Trust signature verificationCorrect Answer:- Encrypted communication between swarm managers and workers by default → Mutual TLS between swarm nodes
- Verifying that an image tag was published by an authorised signer → Docker Content Trust signature verification
- Restricting which users can deploy services to a specific UCP collection → Role-based access control in UCP
- Scanning image layers for known vulnerable packages before deployment → Image vulnerability scanning in the registry
ExplanationSwarm nodes communicate over mutual TLS by default, so each node authenticates the other using certificates issued by the swarm CA. Docker Content Trust verifies publisher signatures on image tags, which is what proves an authorised signer published a tag. UCP role-based access control scopes who can deploy to which collection. Vulnerability scanning in the registry inspects layer packages against known CVE data. Cgroups limit resources rather than authenticate, and VXLAN carries overlay traffic without providing authentication, so neither satisfies the listed controls.
-
6 Question 6 Order list Storage and Volumes
A data engineering team runs a stateful PostgreSQL service on a Docker Swarm cluster. Its data must persist across container rescheduling, and the team must move the service to a new node with a named volume that must be created on the target node before the task starts. Arrange the steps in the correct order.
Drag the steps into the correct order, or use the arrows.
- Update the service with docker service update so the volume mount is used
- Confirm the task runs on the new node and that the volume contains the database files
- Drain the current node with docker node update --availability drain
- Create the named volume on the target node with docker volume create
Correct Answer:- Create the named volume on the target node with docker volume create
- Drain the current node with docker node update --availability drain
- Update the service with docker service update so the volume mount is used
- Confirm the task runs on the new node and that the volume contains the database files
ExplanationA named volume is local to a node, so it must exist on the target before the service can mount it. The source node is drained first so tasks move off it and the database is not written to during the move. Once the volume is in place on the target, the service update adds the mount and the scheduler places the task there. The final check confirms the task is running on the new node and that the data is present. Updating the service before creating the volume would fail because the mount source would not exist on the target.
-
7 Question 7 Single choice Installation and Configuration
A financial services firm runs Docker Engine on RHEL 8 hosts with an overlay2 storage driver. Each host must have a dedicated block device for images and containers, and the storage team needs the engine to start automatically after reboot with the storage configuration applied. Engineers propose several changes. Which change is the correct one to make in the daemon configuration?
Correct Answer: DExplanationThe devicemapper driver is configured through daemon.json storage-driver and storage-opts entries that point to a block device, which fits the requirement for a dedicated block device. Mounting a filesystem at the Docker root with overlay2 satisfies a separate volume but not the stated device-mapper configuration, and it is not the setting the team asked for. AUFS is not supported on RHEL 8, so the proposed change fails the platform constraint. Btrfs requires a btrfs filesystem and is not a dedicated-block-device configuration for the stated driver choice.
-
8 Question 8 Single choice Image Creation, Management, and Registry
A platform team hosts a private registry behind a load balancer and wants to publish a signed image to a repository named payments/api. The security policy requires that consumers can verify the signature when pulling and that the signing key be kept off the build servers. The team already runs Docker Content Trust with a notary server. Which action is the correct next step?
Correct Answer: AExplanationDocker Content Trust signs tags with keys held by the signer, and the policy requires that the signing key stay off the build servers, so signing must happen from a separate signing machine that has the root and repository keys. Setting the trust variable on build servers would place the keys there, violating the policy. TLS on the registry authenticates the connection, not the image, so it does not prove provenance. Docker image inspect reads metadata and does not write signatures into a manifest.
-
9 Question 9 Multiple choice Orchestration
A logistics company runs a swarm stack named tracking with services api, cache, and worker. The operations team must change the stack without downtime for api and must keep the stack definition in version control. The file has a version 3 compose format and must stay deployable with docker stack deploy. Which two actions meet these requirements? (Choose two.)
Correct Answer: A, BExplanationRerunning docker stack deploy with an edited compose file updates the existing services in place, and the update_config settings in the deploy section control rolling updates so api stays available. Removing the stack and redeploying causes downtime, violating the requirement. A manual service update leaves the compose file out of step with the running state, which breaks version-controlled management. Deploying under a new stack name creates a separate set of services instead of changing the existing ones.
-
10 Question 10 Single choice Storage and Volumes
A media company runs a Docker Swarm cluster with a shared storage requirement: a set of transcoding services on different nodes must read and write the same files, and the storage system must scale to billions of small objects accessed over HTTP. The team is choosing between a block device and an object store backend for these containers. Which choice best meets the requirement?
Correct Answer: AExplanationObject storage is designed for massive numbers of small objects accessed over HTTP, and a volume plugin can expose it to containers as a shared filesystem that every node can reach. Local block devices and bind mounts are node-local, so the services would not see the same files. The default local driver keeps data per node, and a single iSCSI device attached to one node cannot be shared across nodes through a bind mount without a cluster filesystem, which the stem does not provide.
-
11 Question 11 Dropdown Image Creation, Management, and Registry
Choose the correct value for each blank.
Choose the correct value for each blank.
An engineer wants to list only the image IDs and repository tags of images created in the last 24 hours, and to see the size and creation time of a specific image in a machine-readable form. The engineer runs docker images --filter and docker inspect --format on the image.Correct Answer:An engineer wants to list only the image IDs and repository tags of images created in the last 24 hours, and to see the size and creation time of a specific image in a machine-readable form. The engineer runs docker images --filter since=24h and docker inspect --format '{{.Created}} {{.Size}}' on the image.
Explanationdocker images accepts a since filter that takes a time reference, and a Go template passed to docker inspect --format can read the top-level Created and Size fields of the image JSON. Option B uses a created filter that docker images does not support and a Config.Size field that does not exist. Option C references Config.Created, which is not a field of the image object. Option D uses an age filter that is not valid for docker images.
-
12 Question 12 Dropdown Security
Choose the correct value for each blank.
Choose the correct value for each blank.
A platform engineer wants to confirm that an image passes a vulnerability scan before promotion and wants every developer's Docker CLI to refuse unsigned pulls from the production repository. The engineer runs docker scan and sets the environment variable to 1 for pulls.Correct Answer:A platform engineer wants to confirm that an image passes a vulnerability scan before promotion and wants every developer's Docker CLI to refuse unsigned pulls from the production repository. The engineer runs docker scan myapp:1.4 and sets the environment variable DOCKER_CONTENT_TRUST to 1 for pulls.
Explanationdocker scan takes the image reference as its argument, and DOCKER_CONTENT_TRUST=1 is the environment variable that causes the client to require signatures on pulls. Option B invents a --signed flag and a DOCKER_SCAN_ENABLE variable that do not exist. Option C uses a --policy flag that docker scan does not accept and DOCKER_TLS_VERIFY, which governs TLS rather than signatures. Option D uses docker inspect, which does not scan, and DOCKER_CERT_PATH, which points to client certificates.
These are 12 of the 191 questions in the full DCA pack.
Get All 191 QuestionsGet all 191 questions & answers
Full access options for Docker DCA
Self-study
PDF Version
- 191 actual exam questions
- Compatible with all devices
- Printable PDF format
- No download limits
- 90 days free updates
- 24/7 customer support
Best value
Bundle Pack
- Discounted PDF + online access
- 191 actual exam questions
- Both PDF and online practice test
- Free 90 days updates
- No download or practice limits
- 24/7 customer support
Exam simulation
Online Practice Test
- 191 actual exam questions
- Actual exam environment
- 90 days free updates
- Browser-based software
- 24/7 customer support
100% Money Back Guarantee
Your success comes first
At DumpsProvider, we give you a 100% money back guarantee on all of our exam dumps. For us, your success is the #1 priority and we are more than confident that our exam material will help you pass the DCA Exam (Docker Certified Associate Exam) on your very first attempt.
In a rare case, if you fail your exam, we will refund your amount without asking a single question.