Docker Certified Associate (DCA) Practice Test Set 4

Which of the following statements is NOT true? By default all files created inside a container are stored on a writable container layer. This means that:


Options are :

  • The data persists when that container no longer exists (Correct)
  • Two different containers can’t share the data present in their writable layer.
  • A container’s writable layer is tightly coupled to the host machine where the container is running. You can’t easily move the data somewhere else.
  • Writing into a container’s writable layer requires a storage driver to manage the filesystem.

Answer :The data persists when that container no longer exists

Fill in the blanks When you create a new container, you add a new ______ layer on top of the underlying layers. This layer is often called the “container layer”.


Options are :

  • read only
  • writable (Correct)
  • filesystem
  • volume

Answer :writable

By default, removing a container also removes the volumes attached to it.


Options are :

  • TRUE
  • FALSE (Correct)

Answer :FALSE

Docker Certified Associate (DCA) Practice Exams Set 19

Which of the following is NOT true about secrets?


Options are :

  • Secrets are encrypted during transit and also at rest
  • Secrets are available to swarm services and standalone containers (Correct)
  • Secrets are mounted in container’s filesystem directly
  • Secrets can be used for storing username and password

Answer :Secrets are available to swarm services and standalone containers

Which one is a valid command to run a global service in docker swarm?


Options are :

  • docker service create --mode global (Correct)
  • docker swarm create --mode global
  • docker service create --global
  • docker swarm create --global

Answer :docker service create --mode global

Which of the following patterns would exclude all Python byte-code files from being copied during the Docker image creation process?


Options are :

  • **.pyc
  • **/*.pyc (Correct)
  • *.pyc
  • /*.pyc

Answer :**/*.pyc

Docker Certified Associate (DCA) Practice Exams Set 18

Bob has configured his docker daemon to use syslog log driver by default, how can he run a container which uses json-file log driver?


Options are :

  • By using “--log-opt json-file” along with docker run
  • By using “--log-driver json-file” along with docker run (Correct)
  • By using “--logger json-file” along with docker run
  • Not possible

Answer :By using “--log-driver json-file” along with docker run

Which of the following commands can be used to see IPv4 subnet of a network


Options are :

  • docker network ls
  • docker info network
  • docker network info
  • docker network inspect (Correct)

Answer :docker network inspect

You want to ensure that a container doesn’t exceed memory usage than a specified amount. Which of the following will be used by default by docker to achieve that?


Options are :

  • namespaces
  • selinux
  • cgroups (Correct)
  • seccomp

Answer :cgroups

Docker Certified Associate (DCA) Practice Test Set 5

Which of the following lvm mode should a production host using the devicemapper as a storage driver use?


Options are :

  • loop-lvm
  • overlay
  • direct-lvm (Correct)
  • zfs

Answer :direct-lvm

What is the correct order a system administrator should follow for creating a backup policy for the Docker Enterprise Edition?


Options are :

  • swarm, ucp, dtr (Correct)
  • dtr, ucp, swarm
  • ucp, dtr, swarm
  • swarm, dtr, ucp

Answer :swarm, ucp, dtr

Which of the following commands can take a tar file as an argument and add the extracted content into the image automatically?


Options are :

  • COPY
  • ADD (Correct)
  • ADD and COPY both
  • None of these

Answer :ADD

Docker Certified Associate (DCA) Practice Tests Set 3

Which of the following options would enable to SSH into a running Docker container named 'nginx'?


Options are :

  • docker exec -it nginx /bin/sh (Correct)
  • docker inspect webserver
  • docker run -it nginx /bin/sh
  • docker ssh -it nginx /bin/sh

Answer :docker exec -it nginx /bin/sh

You are setting up a new Docker Swarm on AWS. You must ensure that the traffic between hosts are not block either by the Security Group Rules nor by Network Access Control List. Which of the following answers covers all ports that must be allowed between Docker hosts?


Options are :

  • TCP/2377 and UDP/2377
  • TCP/7946 and UDP/2377
  • TCP/2377, TCP/7946, and UDP/7946 (Correct)
  • TCP/2377 and TCP/4789

Answer :TCP/2377, TCP/7946, and UDP/7946

Fill in the blank: Docker Content Trust provides the ability to use __________ for verifying integrity and the publisher of all the data received from a registry over any channel.


Options are :

  • end to end encryption
  • digital signatures (Correct)
  • symmetric key encryption
  • a container

Answer :digital signatures

Docker Certified Associate 2020 - Practice Exams - NEW Set 4

Which of the following is NOT true about secrets?


Options are :

  • Secrets are encrypted during transit and also at rest
  • Secrets are available to swarm services and standalone containers (Correct)
  • Secrets are mounted in container’s filesystem directly
  • Secrets can be used for storing username and password

Answer :Secrets are available to swarm services and standalone containers

A global service is a service that runs ____ task/tasks on every node that meet the placement and resource constraints


Options are :

  • many
  • one (Correct)
  • more than one
  • none

Answer :one

In order to install Docker Trusted Registry, you must install the Universal Control Plane. Is this statement TRUE or FALSE?


Options are :

  • TRUE (Correct)
  • FALSE

Answer :TRUE

Docker Certified Associate (DCA) Practice Tests Set 2

Docker image consists of _____ layers each of which represents a Dockerfile instruction. The layers are stacked and each one is a delta of the changes from the previous layer.


Options are :

  • read and write
  • write only
  • read only (Correct)
  • movable

Answer :read only

Which of the following commands can be used to get the disk space used by a running container?


Options are :

  • docker ps -s (Correct)
  • docker ls -s
  • docker image ls
  • docker stats

Answer :docker ps -s

Which of the following commands can take a tar file as an argument and add the extracted content into the image automatically?


Options are :

  • COPY
  • ADD (Correct)
  • ADD and COPY both
  • None of these

Answer :ADD

Docker Certified Associate (DCA) Practice Tests Set 5

Which of the following commands can use a remote URL to get files inside image?


Options are :

  • COPY
  • ADD (Correct)
  • ADD and COPY both
  • DOWNLOAD

Answer :ADD

Which of the following statements is NOT TRUE about multi-stage builds?


Options are :

  • Multi-stage builds eliminates the need of separate Dockerfiles.
  • Multi-stage builds helps on creation of smaller image sizes.
  • You cannot select which step you want to start your build process in a multi-stage build once you defined all steps. (Correct)
  • With multi-stage builds, you can create images for different purposes, such as development and production.

Answer :You cannot select which step you want to start your build process in a multi-stage build once you defined all steps.

Given the following Dockerfile, which of the following is TRUE about it? --- FROM golang:latest ADD . /app/example WORKDIR /app/example RUN go mod download RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o /my-webapp . FROM alpine:latest RUN apk --no-cache add ca-certificates COPY --from=0 /app/example/my-webapp ./ RUN chmod +x ./my-webapp ENTRYPOINT ["./my-webapp"] EXPOSE 8080 ---


Options are :

  • The first image will create a binary file sucessfully. The second image will fail to run the binary because of the missing 'go' binary.
  • This will create a image based on both layers found in golang and alpine images.
  • This will create an image which is based on alpine base image. (Correct)
  • This will create an image which is based on golang base image.

Answer :This will create an image which is based on alpine base image.

Docker Certified Associate (DCA) Practice Test Set 4

Alice created a custom Docker image for a Java web application called "voteapp" which contains a large potion of commands in order to build the application. She pushed this image to the registry and deleted the Docker file by accident. She doens't know what are the steps needs to build this image back. Which of the following commands would help her to describe the steps she took in order to build this image?


Options are :

  • docker inspect voteapp:latest
  • docker image history voteapp:latest (Correct)
  • docker image describe voteapp:latest
  • docker image ls

Answer :docker image history voteapp:latest

Which of the following is NOT a supported storage backend for a centralized storage in DTR?


Options are :

  • Openstack Swift.
  • NFS.
  • Google Cloud Storage.
  • AWS EBS volumes. (Correct)

Answer :AWS EBS volumes.

If we don't specify a tag then by convention which tag is pulled while running docker pull command?


Options are :

  • production
  • staging
  • latest (Correct)
  • master

Answer :latest

Docker Certified Associate (DCA) Practice Tests Set 7

What are the constraints of running the "docker stack deploy" command?


Options are :

  • If you have multiple nodes in your swarm, this command must be run from a manager node. (Correct)
  • If you have multiple nodes in your swarm, this command can be run from any node in the swarm.
  • This command cannot create networks and must be done separately.
  • This command is only available on the Docker Enterprise edition.

Answer :If you have multiple nodes in your swarm, this command must be run from a manager node.

Which of the following statement is correct? Pick exactly two statements.


Options are :

  • Image is a collection of immutable layers whereas container is a running instance of an image. (Correct)
  • Container can exist without the image but image cannot exist without container
  • Only one container can be spawned from a given image at a time
  • If multiple containers are spawned from the same image then they all use the same copy of image in memory. (Correct)

Answer :Image is a collection of immutable layers whereas container is a running instance of an image. If multiple containers are spawned from the same image then they all use the same copy of image in memory.

Overlay networks cannot be created if docker engine is not a manager node in docker swarm?


Options are :

  • TRUE (Correct)
  • FALSE

Answer :TRUE

Docker and Containers: Commands Set 1

Comment / Suggestion Section
Point our Mistakes and Post Your Suggestions