Docker Certified Associate (DCA) Practice Tests Set 11

Which of the following commands does not associate with docker volumes?


Options are :

  • docker volume prune
  • docker volume inspect
  • docker volume create
  • docker volume backup (Correct)

Answer :docker volume backup

Docker Certified Associate 2020 - Practice Exams - NEW Set 2

PersistentVolume cannot be provisioned on-demand. True or False?


Options are :

  • TRUE
  • FALSE (Correct)

Answer :FALSE

Which of the following commands can you use to see the storage driver that Docker is currently using?


Options are :

  • docker config
  • docker status
  • docker inspect
  • docker info (Correct)

Answer :docker info

Each storage driver has its own implementation, but all drivers use stackable image layers and the copy-on-write (CoW) strategy.


Options are :

  • FALSE
  • TRUE (Correct)

Answer :TRUE

Docker Certified Associate (DCA) Practice Exams Set 21

Which of the following options constitutes a production-ready devicemapper configuration for the docker engine?


Options are :

  • Create a volume group in devicemapper and utilize the '--dm.thinpooldev' Docker daemon option, specifying the volume group.
  • Nothing, devicemapper comes ready for production usage out of the box.
  • Utilize the '--storage-opt dm.directlvm_device' Docker daemon option, specifying a block device. (Correct)
  • Format a partition with the xfs and mount it at '/var/lib/docker'

Answer :Utilize the '--storage-opt dm.directlvm_device' Docker daemon option, specifying a block device.

Where does the docker daemon persist all docker related data on the host machine?


Options are :

  • /var/lib/docker (Correct)
  • none
  • /var/lib/docker-ce
  • /etc/docker

Answer :/var/lib/docker

A server is running low on disk space. What command can you use to check the disk usage of images, containers, and volumes for Docker engine?


Options are :

  • docker system df (Correct)
  • docker system free
  • docker system prune
  • docker system ps

Answer :docker system df

Docker Certified Associate (DCA) Practice Exams Set 6

Which of the following is the docker command to remove one or more images?


Options are :

  • docker remove
  • docker image delete
  • docker image rm (Correct)
  • docker delete

Answer :docker image rm

If a container has files or directories in the directory to be mounted, the directory`s content is copied into the volume and then the volume is mounted.


Options are :

  • TRUE (Correct)
  • FALSE

Answer :TRUE

A container named "analytics" that stores results in a volume called "data" was created.

docker run -d --name=analytics -v data:/data mydb

How are the results accessed in "data" with another container called "reports"?


Options are :

  • docker run -d --name=reports --volume=data myapp
  • docker run -d --name=reports --volumes-from=analytics app (Correct)
  • docker run -d --name=reports --volume=mydb myapp
  • docker run -d --name=reports --mount=mydb myapp

Answer :docker run -d --name=reports --volumes-from=analytics app

Docker Certified Associate 2020 - Practice Exams - NEW Set 8

What command would we use to locate the layered file system data for an image on a machine?


Options are :

  • docker image inspect (Correct)
  • docker layer inspect
  • docker image layers
  • docker pull history

Answer :docker image inspect

The devicemapper driver can only use a single block device?


Options are :

  • TRUE
  • FALSE (Correct)

Answer :FALSE

You have a running Ubuntu Container with bash as its default command.

Copy a file called "services.txt" to the tmp directory of the container.

Navigate inside the container and delete the /tmp directory.

Exit from the container and run docker diff command.

Which of the following would be the output of it (docker diff command)?


Options are :

  • C /root A /root/.bash_history D /tmp (Correct)
  • A /root/.bash_history C /root D /tmp
  • None of the answers is correct
  • C /tmp A /tmp/service.txt D /tmp

Answer :C /root A /root/.bash_history D /tmp

Docker and Containers: Commands Set 1

Which of the following statements is true for Docker Image?


Options are :

  • Docker Image layers are downloaded as a tar file and stored at /var/lib/docker/aufs/
  • All the layers of a Docker Image are delta of the previous layer. (Correct)
  • Docker Images are created using Docker Compose.
  • All the layers of docker image are read-only.

Answer :All the layers of a Docker Image are delta of the previous layer.

Data is stored in the host system`s memory when using what type of mount?


Options are :

  • tmpfs (Correct)
  • volumes
  • Regular
  • bind mounts

Answer :tmpfs

If you want to create a container named 'myweb' with a volume inside at '/my/data/volume', which command should you use?


Options are :

  • docker run -d --name myweb -V /my/data/volume httpd:latest
  • docker run -d --name myweb --volumes myvol:/my/data/volume httpd:latest
  • None of the above.
  • docker run -d --name myweb -v myvol:/my/data/volume httpd:latest (Correct)

Answer :docker run -d --name myweb -v myvol:/my/data/volume httpd:latest

Docker Certified Associate (DCA) Practice Tests Set 2

You can define a PersistentVolumeClaim without specifying a class. True or False?


Options are :

  • TRUE (Correct)
  • FALSE

Answer :TRUE

What docker command can you use to remove unused volumes?


Options are :

  • docker remove volume
  • docker prune volume
  • docker volume prune (Correct)
  • docker delete volume

Answer :docker volume prune

Which kind of devicemapper should you configure when installing Docker with the intent to run production workloads?


Options are :

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

Answer :direct-lvm

Docker Certified Associate (DCA) Practice Test Set 3

What kind of relationship exists between a PersistentVolume and a PersistentVolumeClaim?


Options are :

  • one-to-many
  • None of the answers is correct.
  • one-to-one (Correct)
  • many-to-many

Answer :one-to-one

Which of the following statements about DTR garbage collection is true?


Options are :

  • Garbage collection removes unreferenced image layers from DTR's backend storage. (Correct)
  • Garbage collection removes DTR images that are older than a configurable of days.
  • Garbage collection removes unused volumes from cluster nodes
  • Garbage collection removes exited containers from cluster nodes.

Answer :Garbage collection removes unreferenced image layers from DTR's backend storage.

What is the major difference between a container and an image?


Options are :

  • The top writable layer (Correct)
  • The size
  • The bottom writable layer
  • There is no difference

Answer :The top writable layer

Docker Certified Associate 2020 - Practice Exams - NEW Set 7

You have created your company's website with a feature to count the visitors and hosted it using containerized web-servers. Which of the following provisions can potentially make you lose the track of your visitor count?


Options are :

  • bind mounts
  • volumes
  • tmpfs (Correct)
  • all of the above

Answer :tmpfs

Which of the following commands will automatically create a volume when a container is run?


Options are :

  • docker container run --name nginxtest -v myvol:/app nginx (Correct)
  • docker container run --name nginxtest -v /app:mount nginx
  • docker container run --name nginxtest --volume myvol:/app:new nginx
  • docker container run --name nginxtest --volumes=/app nginx

Answer :docker container run --name nginxtest -v myvol:/app nginx

Each container shares the writeable container layer. True or false?


Options are :

  • FALSE (Correct)
  • TRUE

Answer :FALSE

Docker Certified Associate (DCA) Practice Tests Set 5

Which of the following commands can you use to create a bind mount? (select two)


Options are :

  • docker volume make testvol -ro
  • docker run -d --name test -v "$(pwd)"/testvol:/testvol ubuntu:latest (Correct)
  • docker run -d --name test --mount type=bind,source="$(pwd)"/testvol,target=/testvol ubuntu:latest (Correct)
  • docker bind_mount create testvol

Answer :docker run -d --name test -v "$(pwd)"/testvol:/testvol ubuntu:latest docker run -d --name test --mount type=bind,source="$(pwd)"/testvol,target=/testvol ubuntu:latest

Which of the following commands will result in the volume being removed automatically once the container has exited?


Options are :

  • docker run --remove -v /foo busybox
  • docker run --rm -v /foo busybox (Correct)
  • docker run --read-only -v /foo busybox
  • docker run --del -v /foo busybox

Answer :docker run --rm -v /foo busybox

What happened when a PersistentVolumeClaim canít be satisfied?


Options are :

  • None of the above.
  • Clain will get as much resources as possible
  • Claim will remain unbound indefinitely (Correct)
  • Claim will throw an error when defined

Answer :Claim will remain unbound indefinitely

Docker Certified Associate (DCA) Practice Exams Set 19

Which type of mount is best when you donít want the data to persist either on the host machine or within the container?


Options are :

  • volumes
  • tmpfs (Correct)
  • bind mounts
  • Regular

Answer :tmpfs

Arrange the steps below in the correct sequence considering a copy-on-write operation; 

A) Any modifications are made to this copy of the file, and the container cannot see the read-only copy of the file that exists in the lower layer.

B) Perform a copy_up operation on the first copy of the file that is found, to copy the file to the container`s writable layer.

C) Search through the image layers for the file to update. The process starts at the newest layer and works down to the base layer one layer at a time. When results are found, they are added to a cache to speed future operations.


Options are :

  • B, A, C
  • C, B, A (Correct)
  • A, B, C
  • B, C, A

Answer :C, B, A

Comment / Suggestion Section
Point our Mistakes and Post Your Suggestions