Docker Certified Associate (DCA) — Questions and Answers
Question 1: In a multi-stage Dockerfile, how do you copy a file from a previous build stage into the current stage?
- COPY --from=<stage-name> <src> <dest> (Correct answer)
- RUN copy --stage <stage-name> <src> <dest>
- ADD --stage=<stage-name> <src> <dest>
- IMPORT --from=<stage-name> <src> <dest>
Correct answer: COPY --from=<stage-name> <src> <dest>
The COPY --from flag lets you reference a named or numbered previous build stage and copy files from it into the current stage, enabling the multi-stage pattern.
Question 2: Which skill is most critical for effective registry management?
- Communication and stakeholder engagement (Correct answer)
- Technical expertise alone
- Speed of decision-making
- Individual work preferences
Correct answer: Communication and stakeholder engagement
Communication and stakeholder engagement are essential because management success depends on effectively coordinating with and influencing others.
Question 3: Which approach best demonstrates mastery of storage and volumes in Docker Containerization practice?
- Avoiding complex scenarios
- Applying principles to novel situations with sound judgment (Correct answer)
- Relying entirely on technology
- Following procedures without understanding
Correct answer: Applying principles to novel situations with sound judgment
True mastery involves understanding underlying principles well enough to apply them to new and unfamiliar situations with professional judgment.
Question 4: What is the primary consideration when implementing changes to networking?
- Personal convenience
- Impact assessment and change management (Correct answer)
- Speed of implementation
- Vendor preference
Correct answer: Impact assessment and change management
Impact assessment and proper change management ensure that modifications do not introduce unexpected problems or service disruptions.
Question 5: What is the fundamental principle behind networking in the Docker Containerization domain?
- Cost minimization at all costs
- Balancing performance, reliability, and efficiency (Correct answer)
- Using the newest technology exclusively
- Following a single vendor solution
Correct answer: Balancing performance, reliability, and efficiency
Effective technical design requires balancing performance requirements with reliability needs and operational efficiency.
Question 6: How should Docker Containerization professionals handle technical procedures that have been updated or revised?
- Only apply updates to new cases or projects
- Review the updates, complete any required training, and implement the revised procedures (Correct answer)
- Wait for mandatory enforcement before changing
- Continue using the original method if it still works
Correct answer: Review the updates, complete any required training, and implement the revised procedures
When procedures are updated, professionals must review the changes, complete any required training to understand the rationale and new requirements, and implement the revised procedures in their practice. Continuing outdated methods risks non-compliance and suboptimal outcomes.
Question 7: Which factor MOST significantly affects the quality of technical outcomes in Docker Containerization practice?
- The time of day the procedure is performed
- The speed at which procedures are completed
- The practitioner's training, preparation, and attention to detail (Correct answer)
- The brand of equipment being used
Correct answer: The practitioner's training, preparation, and attention to detail
The quality of technical outcomes depends primarily on the practitioner's level of training, thorough preparation, and careful attention to detail. While equipment matters, the professional's competence is the most significant factor.
Question 8: What is the fundamental principle behind networking in the Docker Containerization domain?
- Cost minimization at all costs
- Using the newest technology exclusively
- Balancing performance, reliability, and efficiency (Correct answer)
- Following a single vendor solution
Correct answer: Balancing performance, reliability, and efficiency
Effective technical design requires balancing performance requirements with reliability needs and operational efficiency.
Question 9: Which principle states that users should only have access necessary for their role?
- Principle of least privilege (Correct answer)
- Defense in depth
- Need to share
- Separation of duties
Correct answer: Principle of least privilege
The principle of least privilege ensures users only have the minimum access rights needed to perform their job functions, limiting potential damage.
Question 10: What does the EXPOSE instruction in a Dockerfile actually do?
- It documents which network ports the container intends to listen on at runtime (Correct answer)
- It blocks all ports except the ones specified
- It configures the container's firewall rules
- It automatically publishes the port to the host machine
Correct answer: It documents which network ports the container intends to listen on at runtime
EXPOSE is documentation only; it informs Docker and users which ports the application listens on, but does not actually publish or open the port — that requires -p or -P flags at runtime.
Question 11: In Docker Containerization practice, what is the CORRECT sequence when performing a technical procedure?
- Plan, prepare, execute, verify, and document (Correct answer)
- Execute immediately and document only if issues arise
- Execute, then plan and review
- Document, execute, then plan
Correct answer: Plan, prepare, execute, verify, and document
The correct sequence follows a systematic approach: plan the procedure, prepare necessary resources, execute according to standards, verify results meet specifications, and document the process and outcomes. This ensures quality and accountability.
Question 12: What does 'docker service scale web=5' accomplish?
- Scales CPU and memory resources for each web task by a factor of 5
- Limits the 'web' service to run on 5 nodes maximum
- Creates 5 additional replicas on top of the current count
- Sets the replica count for the 'web' service to 5 tasks (Correct answer)
Correct answer: Sets the replica count for the 'web' service to 5 tasks
The 'docker service scale' command sets the desired number of replicas for a service to the specified value, creating or removing tasks as needed.
Question 13: What defines a multi-stage Docker build?
- Pushing the same image to multiple registries
- Using multiple CMD instructions to run several processes
- Building separate Dockerfiles in parallel on multiple machines
- Using multiple FROM instructions in one Dockerfile to copy artifacts between stages and produce a lean final image (Correct answer)
Correct answer: Using multiple FROM instructions in one Dockerfile to copy artifacts between stages and produce a lean final image
Multi-stage builds use multiple FROM instructions, allowing intermediate stages (e.g., a compiler image) to build artifacts that are then copied into a minimal final image, reducing image size.
Question 14: What is the recommended way to pass secrets to services in a Docker Compose development environment?
- Store them in named volumes
- Use Docker Swarm secrets (not available in standalone Compose)
- Use a .env file with docker compose env_file or environment variables (Correct answer)
- Hardcode values in docker-compose.yml
Correct answer: Use a .env file with docker compose env_file or environment variables
In development, environment variables via .env files or env_file directive are the standard approach. Docker secrets are only available in Swarm mode.
Question 15: What does 'docker compose logs -f' do?
- Follows (streams) log output from all running services (Correct answer)
- Writes logs to a file
- Shows the last 10 log lines from each service
- Shows only error-level logs
Correct answer: Follows (streams) log output from all running services
The -f (follow) flag streams live log output from all services, similar to 'tail -f', making it useful for monitoring application behavior in real time.
Question 16: In Docker Containerization practice, what is the purpose of vulnerability scanning?
- To exploit systems
- To replace firewalls
- To slow down network traffic
- To identify weaknesses before attackers do (Correct answer)
Correct answer: To identify weaknesses before attackers do
Vulnerability scanning proactively identifies security weaknesses in systems and applications so they can be remediated before exploitation.
Question 17: Which approach is recommended for troubleshooting networking issues?
- Use systematic isolation and testing methods (Correct answer)
- Wait for the problem to resolve itself
- Replace all components simultaneously
- Rely solely on past experience
Correct answer: Use systematic isolation and testing methods
Systematic isolation and testing methodically narrows down the root cause, making troubleshooting efficient and accurate.
Question 18: What is the recommended response when a security incident is detected in an Docker Containerization environment?
- Delete all logs immediately
- Ignore minor incidents
- Follow the incident response plan: contain, eradicate, recover (Correct answer)
- Immediately shut down all systems
Correct answer: Follow the incident response plan: contain, eradicate, recover
Following a structured incident response plan ensures containment of the threat, eradication of the cause, and recovery to normal operations.
Question 19: Which approach is MOST important for Docker Containerization professionals when applying technical procedures?
- Following personal shortcuts developed through experience
- Applying the same technique in every situation without variation
- Using the fastest method available regardless of standards
- Adhering to established protocols while adapting to specific conditions (Correct answer)
Correct answer: Adhering to established protocols while adapting to specific conditions
Technical procedures require adherence to established protocols as a foundation, with professional judgment to adapt appropriately to specific conditions. This balance ensures both consistency and effectiveness.
Question 20: Which Compose feature lets you extend and reuse service definitions across multiple compose files?
- The 'extends' key referencing another service or file (Correct answer)
- The 'template' key
- YAML anchors and aliases
- The 'import' key
Correct answer: The 'extends' key referencing another service or file
The extends key allows a service to inherit configuration from another service defined in the same or a different Compose file.
Question 21: How should Docker Containerization professionals handle technical procedures that have been updated or revised?
- Continue using the original method if it still works
- Only apply updates to new cases or projects
- Review the updates, complete any required training, and implement the revised procedures (Correct answer)
- Wait for mandatory enforcement before changing
Correct answer: Review the updates, complete any required training, and implement the revised procedures
When procedures are updated, professionals must review the changes, complete any required training to understand the rationale and new requirements, and implement the revised procedures in their practice. Continuing outdated methods risks non-compliance and suboptimal outcomes.
Question 22: What role does collaboration play in storage and volumes for Docker Containerization professionals?
- It enhances outcomes through diverse perspectives and shared expertise (Correct answer)
- It is only needed in emergencies
- It reduces individual accountability
- It slows down work unnecessarily
Correct answer: It enhances outcomes through diverse perspectives and shared expertise
Collaboration leverages diverse perspectives and combined expertise to achieve better outcomes than any individual could alone.
Question 23: When deploying a Docker stack with 'docker stack deploy', which file format is required?
- Dockerfile with multi-stage build syntax
- Docker run command exported as JSON
- Docker Compose file (version 3 or higher) (Correct answer)
- Kubernetes YAML manifest
Correct answer: Docker Compose file (version 3 or higher)
Docker stack deploy requires a Compose file in version 3 format, which supports Swarm-specific 'deploy' keys ignored by plain docker-compose.
Question 24: What is the primary purpose of encryption in Docker Containerization security?
- To compress data
- To organize data more efficiently
- To make data transfer slower
- To protect data confidentiality during storage and transmission (Correct answer)
Correct answer: To protect data confidentiality during storage and transmission
Encryption protects data confidentiality by converting information into an unreadable format that can only be decoded with the proper key.
Question 25: In Docker Containerization certification, what does redundancy in system design primarily provide?
- Fault tolerance and high availability (Correct answer)
- Simplified maintenance
- Increased complexity
- Lower initial cost
Correct answer: Fault tolerance and high availability
Redundancy provides fault tolerance by ensuring that if one component fails, backup components maintain system availability.
Question 26: What is the difference between the ARG and ENV instructions in a Dockerfile?
- ARG and ENV are interchangeable at both build time and runtime
- ARG persists in the final image; ENV is only available at build time
- ARG sets system-level variables; ENV sets application-level variables
- ARG is only available during the build process; ENV persists in the final image and running containers (Correct answer)
Correct answer: ARG is only available during the build process; ENV persists in the final image and running containers
ARG defines build-time variables passed via --build-arg that are not available in the running container, while ENV variables persist into the final image and are accessible at runtime.
Question 27: What is the primary consideration when implementing changes to networking?
- Personal convenience
- Impact assessment and change management (Correct answer)
- Vendor preference
- Speed of implementation
Correct answer: Impact assessment and change management
Impact assessment and proper change management ensure that modifications do not introduce unexpected problems or service disruptions.
Question 28: Which documentation is essential when working with networking in Docker Containerization?
- Only verbal notes
- General descriptions without specifics
- Marketing materials
- Detailed technical specifications and as-built diagrams (Correct answer)
Correct answer: Detailed technical specifications and as-built diagrams
Detailed technical specifications and as-built diagrams provide the accurate reference information needed for maintenance and troubleshooting.
Question 29: What role does calibration play in maintaining technical accuracy for Docker Containerization professionals?
- It is an optional best practice for advanced professionals
- It is only necessary for new equipment
- It ensures instruments and methods produce accurate, consistent results over time (Correct answer)
- It only matters during formal inspections
Correct answer: It ensures instruments and methods produce accurate, consistent results over time
Regular calibration ensures that instruments, tools, and methods continue to produce accurate and consistent results over time. Without calibration, measurement drift and equipment wear can lead to unreliable outcomes.
Question 30: Which base image is most commonly recommended for minimizing Docker image size in production?
- debian:latest
- alpine:latest (Correct answer)
- ubuntu:latest
- centos:7
Correct answer: alpine:latest
Alpine Linux is a minimal distribution (~5MB) that is widely used as a base image to keep Docker images small, reducing pull times and attack surface.
Question 31: What is Docker Swarm mode's approach to TLS and certificate management?
- Only manager-to-manager communication is encrypted
- Swarm uses pre-shared keys instead of certificates
- TLS must be configured manually by the operator
- Swarm automatically generates a CA and mutual TLS certificates for all node communication (Correct answer)
Correct answer: Swarm automatically generates a CA and mutual TLS certificates for all node communication
When you initialize a swarm, Docker automatically creates an internal CA and issues TLS certificates to all nodes, rotating them every 90 days by default.
Question 32: What is the value of continuing education in storage and volumes for Docker Containerization professionals?
- It replaces workplace experience
- It is only needed for recertification
- It is primarily a social activity
- It keeps professionals current with evolving standards and practices (Correct answer)
Correct answer: It keeps professionals current with evolving standards and practices
Continuing education ensures professionals stay current with the latest developments, standards, and best practices in their field.
Question 33: Which Compose file directive sets resource limits for a service in Swarm-compatible format?
- resources: limits/reservations (top-level)
- deploy: resources: limits/reservations (Correct answer)
- limits: cpu/memory (under service)
- constraints: cpu/memory (under service)
Correct answer: deploy: resources: limits/reservations
In Compose file format v3+, resource limits are defined under the 'deploy' key as 'resources: limits:' and 'resources: reservations:', which is also used by Docker Swarm.
Question 34: What is the best practice for maintaining networking performance over time?
- Wait for failures before acting
- Implement scheduled preventive maintenance (Correct answer)
- Outsource all maintenance
- Upgrade all equipment annually
Correct answer: Implement scheduled preventive maintenance
Scheduled preventive maintenance catches potential issues before they cause failures, maintaining reliability and extending equipment life.
Question 35: What is defense in depth in the context of Docker Containerization security?
- Using one strong security control
- Relying solely on encryption
- Focusing only on perimeter security
- Implementing multiple layers of security controls (Correct answer)
Correct answer: Implementing multiple layers of security controls
Defense in depth uses multiple layers of security controls so that if one layer fails, additional layers continue to provide protection.
Question 36: Which professional attribute is most valued in storage and volumes within the Docker Containerization field?
- Accountability and commitment to standards (Correct answer)
- Prioritizing personal convenience
- Working in isolation
- Avoiding challenging situations
Correct answer: Accountability and commitment to standards
Accountability and commitment to professional standards build trust and ensure consistent, high-quality practice.
Question 37: What minimum number of manager nodes is recommended for a production Docker Swarm to tolerate one manager failure?
- 2
- 4
- 3 (Correct answer)
- 5
Correct answer: 3
With 3 managers, the Raft quorum requires 2 (majority), so 1 manager failure can be tolerated while maintaining cluster operability.
Question 38: What is the exec form of a Dockerfile instruction, and why is it preferred for ENTRYPOINT and CMD?
- ENTRYPOINT command param1 — preferred because it uses the shell's PATH
- ENTRYPOINT (executable param1) — preferred because it enables parameter substitution
- ENTRYPOINT {executable: param1} — preferred because it is JSON-compatible
- ENTRYPOINT ["executable", "param1"] — preferred because it runs the executable directly without a shell, so signals are received correctly (Correct answer)
Correct answer: ENTRYPOINT ["executable", "param1"] — preferred because it runs the executable directly without a shell, so signals are received correctly
The exec form uses a JSON array and runs the executable directly without invoking a shell, which means the process receives OS signals (like SIGTERM) properly — critical for graceful container shutdown.
Question 39: Which factor MOST significantly affects the quality of technical outcomes in Docker Containerization practice?
- The brand of equipment being used
- The speed at which procedures are completed
- The practitioner's training, preparation, and attention to detail (Correct answer)
- The time of day the procedure is performed
Correct answer: The practitioner's training, preparation, and attention to detail
The quality of technical outcomes depends primarily on the practitioner's level of training, thorough preparation, and careful attention to detail. While equipment matters, the professional's competence is the most significant factor.
Question 40: What is the Docker daemon's name?
- dockerdaemon
- dockerproc
- dockerprocess
- dockerd (Correct answer)
Correct answer: dockerd
Explanation: <br> The Docker daemon (dockerd) manages Docker objects such as images, containers, networks, and volumes by listening for Docker API requests. To manage Docker services, a daemon can communicate with other daemons.
Question 41: Which authentication factor is classified as "something you are"?
- Security token
- Password
- Biometric data (Correct answer)
- Smart card
Correct answer: Biometric data
Biometric data such as fingerprints, facial recognition, or retinal scans represents the "something you are" authentication factor.
Question 42: In Docker Containerization practice, what is the purpose of vulnerability scanning?
- To exploit systems
- To replace firewalls
- To identify weaknesses before attackers do (Correct answer)
- To slow down network traffic
Correct answer: To identify weaknesses before attackers do
Vulnerability scanning proactively identifies security weaknesses in systems and applications so they can be remediated before exploitation.
Question 43: Which Dockerfile command provides a mount point within the Container that connects it to the Docker Host's file systems?
- VOLUME (Correct answer)
- RUN
- WORKDIR
- EXPOSE
Correct answer: VOLUME
Explanation: <br> VOLUME — Creates a mount point within the Container that connects it to the Docker Host's file systems. The contents of the chosen point in the image are filled into new volumes. It's also important to note that specifying Volumes in a Dockerfile can cause problems.
Question 44: Which authentication factor is classified as "something you are"?
- Security token
- Biometric data (Correct answer)
- Smart card
- Password
Correct answer: Biometric data
Biometric data such as fingerprints, facial recognition, or retinal scans represents the "something you are" authentication factor.
Question 45: What is the most important professional competency for Docker Containerization certification in storage and volumes?
- Deep knowledge combined with practical application skills (Correct answer)
- Ability to work alone exclusively
- Memorization of all reference materials
- Speed of task completion
Correct answer: Deep knowledge combined with practical application skills
Professional competency requires both deep knowledge of the subject matter and the ability to apply that knowledge in practical situations.
Question 46: What happens to Docker's build cache when a Dockerfile instruction changes?
- The cache is unaffected and the old layer is reused
- The entire cache is cleared for all images on the system
- The changed layer and all subsequent layers are invalidated and rebuilt (Correct answer)
- Only the changed layer is rebuilt; subsequent layers are reused
Correct answer: The changed layer and all subsequent layers are invalidated and rebuilt
Docker invalidates the cache starting at the changed instruction, so that changed layer and every layer after it are rebuilt to ensure correctness.
Question 47: Which 'docker build' flag allows you to stop at a specific named stage in a multi-stage Dockerfile?
- --from
- --stage
- --phase
- --target (Correct answer)
Correct answer: --target
The --target flag tells Docker to build only up to and including the specified named stage, which is useful for debugging or producing intermediate artifacts.
Question 48: In Docker Containerization practice, what is the CORRECT sequence when performing a technical procedure?
- Document, execute, then plan
- Plan, prepare, execute, verify, and document (Correct answer)
- Execute, then plan and review
- Execute immediately and document only if issues arise
Correct answer: Plan, prepare, execute, verify, and document
The correct sequence follows a systematic approach: plan the procedure, prepare necessary resources, execute according to standards, verify results meet specifications, and document the process and outcomes. This ensures quality and accountability.
Question 49: Which Dockerfile instruction sets a persistent environment variable that is available both during the build and when the container runs?
- SET
- VAR
- ARG
- ENV (Correct answer)
Correct answer: ENV
ENV sets environment variables that persist in the final image and are accessible to running containers, unlike ARG which is only available at build time.
Question 50: What is the difference between 'docker compose up' and 'docker compose start'?
- They are identical
- up creates and starts containers; start only starts already-existing stopped containers (Correct answer)
- up is for Swarm; start is for standalone
- start creates new containers; up only restarts existing ones
Correct answer: up creates and starts containers; start only starts already-existing stopped containers
docker compose up creates new containers if they don't exist and starts them. docker compose start only starts containers that already exist but are stopped.
Question 51: In Docker Containerization practice, what is the best approach to quality improvement in storage and volumes?
- Copy what other organizations do without analysis
- Use data-driven methods with measurable outcomes (Correct answer)
- Make changes without measuring results
- Wait for problems to occur before acting
Correct answer: Use data-driven methods with measurable outcomes
Data-driven quality improvement with measurable outcomes ensures that changes actually produce the intended improvements and can be verified.
Question 52: What is the key difference between the ADD and COPY instructions in a Dockerfile?
- COPY supports remote URLs; ADD only handles local files
- COPY auto-extracts archives; ADD requires manual extraction
- ADD supports remote URLs and auto-extracts tar archives; COPY only copies local files as-is (Correct answer)
- ADD and COPY are functionally identical
Correct answer: ADD supports remote URLs and auto-extracts tar archives; COPY only copies local files as-is
ADD has additional functionality: it can fetch files from remote URLs and automatically extract compressed archives like .tar.gz, while COPY is a simpler, more transparent instruction for local files.
Question 53: What enables multiple Docker daemons to scale containers?
- Docker image
- Docker container
- Docker service
- Docker registry (Correct answer)
Correct answer: Docker registry
Explanation: <br> A Docker registry is a storage and distribution system for Docker images with particular names. Several copies of the same image may exist, each with its own set of tags. A Docker registry is divided into Docker repositories, each of which keeps track of all image changes.
Question 54: Which Swarm placement constraint would restrict a service to only run on nodes labeled 'env=production'?
- --placement 'env:production'
- --constraint 'node.labels.env==production' (Correct answer)
- --reserve 'node.env=production'
- --filter 'label=env=production'
Correct answer: --constraint 'node.labels.env==production'
Placement constraints use the syntax --constraint 'node.labels.<key>==<value>' to target nodes with specific labels.
Question 55: How does Docker layer caching improve build performance?
- Docker reuses cached layers from previous builds when Dockerfile instructions and their context have not changed (Correct answer)
- Docker caches the build context but always re-executes instructions
- Docker stores only the final image layer and rebuilds intermediates
- Docker downloads layers in parallel from the registry
Correct answer: Docker reuses cached layers from previous builds when Dockerfile instructions and their context have not changed
Docker caches each image layer; if an instruction and its inputs haven't changed since the last build, Docker reuses the cached layer and skips re-executing that step.
Docker Certified Associate (DCA)
The Docker Certified Associate (DCA) exam validates skills in containerization, orchestration, networking, security, and storage using Docker technologies. It is administered by Mirantis and targets intermediate-level Docker practitioners.
Exam Rules
- You can skip questions and return to them later
- Flag questions for review before submitting
- No feedback shown until you submit the entire exam
- Unanswered questions count as wrong — answer everything
- 10 pretest questions are mixed in and don't affect your score
- Timer auto-submits when time runs out
- Your progress is auto-saved every 30 seconds