Docker Certified Associate 2020 - Practice Exams - NEW Set 11

What is the function of docker inspect command ?


Options are :

  • To display system-wide information
  • To manage Docker configs
  • To return low-level information on Docker objects (Correct)
  • To inspect changes to files or directories on a container's filesystem

Answer :To return low-level information on Docker objects

While updating a swarm service, which of the following flags is used to configure the maximum number of service tasks that a scheduler can update simultaneously?


Options are :

  • --update-max-failure-ratio
  • --update-order
  • --update-parallelism (Correct)
  • --update-max

Answer :--update-parallelism

Which of the following signals is sent to a running container when you run the command 'docker stop'?


Options are :

  • SIGTERM (Correct)
  • SIGKILL (Correct)
  • SIGINT
  • SIGQUIT

Answer :SIGTERM SIGKILL

Docker Certified Associate (DCA) Practice Tests Set 2

Which of the following are valid options for the '--update-failure-action' of the 'docker service create' and 'docker service update' commands?


Options are :

  • continue (Correct)
  • stop
  • pause (Correct)
  • retry
  • rollback (Correct)

Answer :continue pause rollback

Which set of commands can identify the published port(s) for a container? (Select all that apply)


Options are :

  • 'docker network inspect','docker port'
  • 'docker container inspect', docker port' (Correct)
  • 'docker info','docker network inspect'
  • 'docker port inspect', 'docker container inspect'

Answer :'docker container inspect', docker port'

Which of the following are valid operating systems to run Docker CE Desktop? (select two)


Options are :

  • Windows 8
  • MacOS (Correct)
  • Windows 10 (Correct)
  • Linux

Answer :MacOS Windows 10

Docker Certified Associate 2020 - Practice Exams - NEW Set 9

Which of the following logging drivers are mandatory for 'docker log' command to successfully function?


Options are :

  • splunk
  • journald (Correct)
  • json-file (Correct)
  • fluentd

Answer :journald json-file

What is the docker command to add a network to a service?


Options are :

  • docker service add-network name=my-network,alias=web1 myservice
  • docker service set --add-network name=my-network,alias=web1 myservice
  • docker service update --network-add name=my-network,alias=web1 myservice (Correct)
  • docker service modify --add-network name=my-network,alias=web1 myservice

Answer :docker service update --network-add name=my-network,alias=web1 myservice

Which of the following is NOT true about docker stack?


Options are :

  • docker stack can run without docker swarm (Correct)
  • docker stack is more suited for production environments
  • docker stack can be used to manage multiple services
  • docker-compose.yaml file can be used by docker stack

Answer :docker stack can run without docker swarm

Docker Certified Associate (DCA) Practice Tests Set 7

The following health check exists in a Dockerfile:

'HEALTCHECK CMD curl --fail http://localhost/health || exit 1'

Which of the following describes its purpose?


Options are :

  • Defines the health check for the containerized application so that the application health can be monitored by the Docker engine.
  • Defines the health check endpoint on the local host interface for containers to monitor the health of the docker engine.
  • Defines the action taken when container health fails, which in this case will kill the container with exit status 1. (Correct)
  • Defines the health check endpoint on the localhost interface for external monitoring tools to monitor the health of the docker engine.

Answer :Defines the action taken when container health fails, which in this case will kill the container with exit status 1.

From a DevOps process standpoint, it is best practice to keep changes to an application in version control. Which of the following will allow changes to a docker image to be stored in a version control system?


Options are :

  • docker commit (Correct)
  • A docker file
  • A docker-compose.yaml file
  • docker save

Answer :docker commit

Which of the following commands can be used to create a volume? (Select all that apply)


Options are :

  • docker volume create nginxvol (Correct)
  • docker run -d --name nginxvol -v nginxvol:/nginxvol nginx:latest (Correct)
  • docker run -d --name nginxvol --mount source=nginxvol,target=/nginxvol nginx:latest (Correct)
  • docker volume make nginxvol

Answer :docker volume create nginxvol docker run -d --name nginxvol -v nginxvol:/nginxvol nginx:latest docker run -d --name nginxvol --mount source=nginxvol,target=/nginxvol nginx:latest

Docker and Containers: Commands Set 3

In a Kubernetes environment, a role of Restrict Policy is associated with a user A. In this way, user  A will be unable to launch a privileged container. True or False ?


Options are :

  • False.
  • True (Correct)

Answer :True

Which of the following statements is incorrect?


Options are :

  • The column 'size' of docker ps -s output shows the amount of data that is used for the writable layer of each container.
  • When a container is deleted, the writable layer is persisted. (Correct)
  • The column 'virtual size' of docker ps -s output shows the amount of data used for the read-only image data used by the container plus the container's writable layer 'size'.
  • Copy-on-write is a Docker strategy of sharing and copying files for maximum efficiency.

Answer :When a container is deleted, the writable layer is persisted.

Webhooks are GET requests used to request data from the URL defined in Docker Hub. True or False ?


Options are :

  • True
  • False (Correct)

Answer :False

Docker Certified Associate (DCA) Practice Exams Set 19

What is the recommended way to configure the daemon flags and environment variables for your Docker daemon in a platform independent way?


Options are :

  • Set the configuration options using the ENV variable
  • Set the configuration DOCKER_OPTS in '/etc/default/docker'
  • Using 'docker config' to set the configuration options.
  • Set the configuration options in '/etc/docker/daemon.json' (Correct)

Answer :Set the configuration options in '/etc/docker/daemon.json'

Which of these swarm manager configurations will cause the cluster to be in a lost quorum state?


Options are :

  • 1 manager of which 1 is healthy
  • 3 managers of which 2 are healthy
  • 4 managers of which 2 are healthy (Correct)
  • 5 managers of which 3 are healthy

Answer :4 managers of which 2 are healthy

Which type of mount is a good use case when you do not want the data to persist either on the host machine or within the container?


Options are :

  • Volumes
  • bind mounts
  • unionfs
  • tempfs (Correct)

Answer :tempfs

Docker Certified Associate (DCA) Practice Exams Set 26

Although it is possible easily edit a container hostname, a containerís hostname defaults is the container ID . True or False ?


Options are :

  • False
  • True (Correct)

Answer :True

What is the docker command to update an existing service?


Options are :

  • docker service update [OPTIONS] SERVICE. (Correct)
  • docker service change [OPTIONS] SERVICE.
  • docker service config [OPTIONS] SERVICE.
  • docker service modify [OPTIONS] SERVICE.

Answer :docker service update [OPTIONS] SERVICE.

Docker security scan can be started by all users including those with read-only access. True or false?


Options are :

  • False (Correct)
  • True

Answer :False

Docker Certified Associate (DCA) Practice Exams Set 7

After restoring a swarm backup you should run 'docker swarm init' with which flag to ensure that the node does not attempt to connect to nodes that were part of the old swarm?


Options are :

  • --restore
  • --force
  • --force-init
  • --force-new-cluster (Correct)

Answer :--force-new-cluster

After creating a new service named 'http', you notice that the new service is not registering as healthy. How do you view the list of historical tasks for that service by using the command line?


Options are :

  • 'docker ps http'
  • 'docker service inspect http'
  • 'docker service ps http' (Correct)
  • 'docker inspect http'

Answer :'docker service ps http'

By default, a container has no resource constraints and can use as much of a given resource as the hostís kernel scheduler allows. True or False ?


Options are :

  • True (Correct)
  • False

Answer :True

Docker Certified Associate 2020 - Practice Exams - NEW Set 9

Which of the Dockerfile options initializes a new build stage and sets the base image for subsequent instructions?


Options are :

  • CMD
  • RUN
  • FROM (Correct)
  • ONBUILD

Answer :FROM

What is one way of directly transferring a Docker Image from one Docker host to another?


Options are :

  • docker commit' to save the image outside of the Docker filesystem. Then transfer the file over to the target host and 'docker start' to start the container again.
  • docker save' the image to save it as TAR file and copy it over to the target host. Then use 'docker load' to un-TAR the image back as a Docker image. (Correct)
  • docker push' the image to the IP address of the target host.
  • There is no way of directly transferring Docker images between hosts. A Docker Registry must be used ad an intermediary.

Answer :docker save' the image to save it as TAR file and copy it over to the target host. Then use 'docker load' to un-TAR the image back as a Docker image.

Which of the following is the default AppArmor security profile for containers in Docker?


Options are :

  • docker-default (Correct)
  • docker-app
  • docker-secure
  • docker/apparmor

Answer :docker-default

Docker Certified Associate (DCA) Practice Exams Set 17

Multiple volumes can be associated with a single Pod?


Options are :

  • True (Correct)
  • False

Answer :True

How many layers would the image contain given the docker file below?


FROM ubuntu:15.04

COPY . /app

RUN make /app

CMD python /app/app.py


Options are :

  • 1
  • 3
  • 2
  • 4 (Correct)

Answer :4

Which of the following commands is used to create an overlay network for standalone containers?


Options are :

  • docker network create --ingress test-overlay
  • docker network create -d overlay test-overlay
  • docker swarm create -d overlay test-service
  • docker network create -d overlay --attachable test-overlay (Correct)

Answer :docker network create -d overlay --attachable test-overlay

Docker Certified Associate (DCA) Practice Exams Set 17

Comment / Suggestion Section
Point our Mistakes and Post Your Suggestions