Docker Certified Associate (DCA)
Examination Questions And Correct
Answers (Verified Answers) Plus
Rationales 2026 Q&A | Instant
Download Pdf
Question 1
Which Docker component is responsible for building container images?
A. Docker Compose
B. Docker Engine
C. Docker Swarm
D. Docker Hub
Answer: B
Rationale: Docker Engine is the core runtime that builds, runs, and manages
containers. It includes the daemon (dockerd) which executes image builds using
Dockerfiles. Compose is for multi-container definitions, Swarm handles
orchestration, and Docker Hub is a registry, not a build system.
Question 2
What is the default network driver used by Docker containers?
A. overlay
B. bridge
,C. host
D. macvlan
Answer: B
Rationale: The default Docker network driver is bridge, which isolates containers
on a private internal network while allowing controlled external access. Overlay
is used in Swarm, host removes network isolation, and macvlan assigns MAC
addresses.
Question 3
Which command is used to list all running containers?
A. docker ps
B. docker images
C. docker inspect
D. docker run
Answer: C
Rationale: docker inspect is used to display detailed metadata of containers or
images, including configuration and networking information. docker ps lists
running containers, docker images lists images, and docker run starts containers.
Question 4
Which file defines instructions to build a Docker image?
A. docker-compose.yml
B. Dockerfile
C. container.yml
D. image.config
Answer: A
,Rationale: A Dockerfile contains step-by-step instructions for building a Docker
image such as FROM, RUN, COPY, and CMD. Compose files define multi-
container applications, not image builds.
Question 5
What is the purpose of EXPOSE in a Dockerfile?
A. Publishes container ports to host
B. Documents which port the container listens on
C. Opens firewall rules automatically
D. Maps container to external IP
Answer: B
Rationale: EXPOSE is metadata that documents which ports the container listens
on. It does not publish ports automatically; that requires -p or -P at runtime.
Question 6
Which command removes a Docker image?
A. docker rm
B. docker rmi
C. docker delete image
D. docker remove
Answer: B
Rationale: docker rmi removes one or more images from local storage. docker rm
removes containers, not images.
Question 7
Which instruction sets the default command in a Docker container?
, A. RUN
B. ENTRYPOINT
C. CMD
D. START
Answer: C
Rationale: CMD defines the default command executed when a container starts.
ENTRYPOINT defines a fixed executable, while RUN executes commands during
image build.
Question 8
What is the function of Docker volumes?
A. Store container logs only
B. Persist data outside container lifecycle
C. Increase container CPU allocation
D. Encrypt container images
Answer: B
Rationale: Docker volumes provide persistent storage independent of container
lifecycle, ensuring data remains even after container deletion.
Question 9
Which command builds a Docker image from a Dockerfile?
A. docker create
B. docker build
C. docker compile
D. docker make
Answer: D
Examination Questions And Correct
Answers (Verified Answers) Plus
Rationales 2026 Q&A | Instant
Download Pdf
Question 1
Which Docker component is responsible for building container images?
A. Docker Compose
B. Docker Engine
C. Docker Swarm
D. Docker Hub
Answer: B
Rationale: Docker Engine is the core runtime that builds, runs, and manages
containers. It includes the daemon (dockerd) which executes image builds using
Dockerfiles. Compose is for multi-container definitions, Swarm handles
orchestration, and Docker Hub is a registry, not a build system.
Question 2
What is the default network driver used by Docker containers?
A. overlay
B. bridge
,C. host
D. macvlan
Answer: B
Rationale: The default Docker network driver is bridge, which isolates containers
on a private internal network while allowing controlled external access. Overlay
is used in Swarm, host removes network isolation, and macvlan assigns MAC
addresses.
Question 3
Which command is used to list all running containers?
A. docker ps
B. docker images
C. docker inspect
D. docker run
Answer: C
Rationale: docker inspect is used to display detailed metadata of containers or
images, including configuration and networking information. docker ps lists
running containers, docker images lists images, and docker run starts containers.
Question 4
Which file defines instructions to build a Docker image?
A. docker-compose.yml
B. Dockerfile
C. container.yml
D. image.config
Answer: A
,Rationale: A Dockerfile contains step-by-step instructions for building a Docker
image such as FROM, RUN, COPY, and CMD. Compose files define multi-
container applications, not image builds.
Question 5
What is the purpose of EXPOSE in a Dockerfile?
A. Publishes container ports to host
B. Documents which port the container listens on
C. Opens firewall rules automatically
D. Maps container to external IP
Answer: B
Rationale: EXPOSE is metadata that documents which ports the container listens
on. It does not publish ports automatically; that requires -p or -P at runtime.
Question 6
Which command removes a Docker image?
A. docker rm
B. docker rmi
C. docker delete image
D. docker remove
Answer: B
Rationale: docker rmi removes one or more images from local storage. docker rm
removes containers, not images.
Question 7
Which instruction sets the default command in a Docker container?
, A. RUN
B. ENTRYPOINT
C. CMD
D. START
Answer: C
Rationale: CMD defines the default command executed when a container starts.
ENTRYPOINT defines a fixed executable, while RUN executes commands during
image build.
Question 8
What is the function of Docker volumes?
A. Store container logs only
B. Persist data outside container lifecycle
C. Increase container CPU allocation
D. Encrypt container images
Answer: B
Rationale: Docker volumes provide persistent storage independent of container
lifecycle, ensuring data remains even after container deletion.
Question 9
Which command builds a Docker image from a Dockerfile?
A. docker create
B. docker build
C. docker compile
D. docker make
Answer: D