Grizzlybit
Published in

Grizzlybit

Practice Questions for Docker Certified Associate (DCA) Exam 🐳 — Set 2

Docker Certified Associate (DCA)

Continuing where we had previously left off. Here is “Set-2" in our series of DCA Practice Questions. Remember, the more you practice, the better are your chances. 😉

  1. What is a grant made up of in Docker’s Role-Based Access Controls (RBAC)? (select three)

Options are :

  • Certificate
  • Role
  • Resource Collection
  • Subject

Answer: Role Resource Collection Subject

2. Where do you create Docker Role-Based Access Controls (RBAC)?

Options are :

  • Docker Machine
  • Universal Control Plane
  • Docker compose
  • Docker Trusted Registry

Answer: Universal Control Plane

3. What is the docker command to add or update a node label?

Options are:

  • docker node update --set-label
  • docker node update --label-add
  • docker node modify --set-label
  • docker node add --label

Answer: docker node update --label-add

4. How would we back up Docker Swarm?

Options are:

  • Back up the layered file systems of all containers running within the swarm.
  • Back up the contents of /etc/docker/swarm on a Swarm manager.
  • Back up the contents of /etc/docker on a Swarm manager.
  • Back up the contents of /var/lib/docker/swarm on a Swarm manager.

Answer: Back up the contents of /var/lib/docker/swarm on a Swarm manager.

  • Which of the following items need to be considered before installing Docker Enterprise?

Options are:

  • Docker Engine, DTR, and UCP version Compatibility
  • All of the above
  • Disk Space
  • Networks Ports
  • Time Synchronization

Answer: All of the above

  • What Linux feature does Docker use in order to limit memory usage for containers?

Options are:

  • The mem namespace.
  • Capabilities
  • Namespaces
  • Control groups ( groups )

Answer: Control groups ( cgroups )

  • What is the docker command to update an existing service?

Options are:

  • docker service change
  • docker service update
  • docker service modify
  • docker service config

Answer: docker service update

  • Chris wants to execute a one-time job using a Docker container. However, occasionally, this job fails and needs to restart. Chris doesn’t want to restart it manually if it fails. Which command should he use to make sure that the container executes the one-time job successfully?

Options are:

  • docker run --restart on-failure cleanup-job
  • docker run --recover-failure cleanup-job
  • docker run --restart failure-only cleanup-job
  • docker run --restart unless-stopped cleanup-job

Answer: docker run --restart on-failure cleanup-job

  • What is the docker command to see container logs?

Options are:

  • docker fetch-logs
  • docker dumo-logs
  • docker debug
  • dns logs

Answer: dns logs

  • What is the docker command to add or update a mount on a service?

Options are:

  • docker service --add-update-mount
  • docker service update --mount-add
  • docker service --mount-volume
  • docker service set --add-update-mount

Answer: docker service update --mount-add

  • You can remove unused volumes using which command?

Options are:

  • docker prune volume
  • docker delete volume
  • docker volume prune
  • docker remove volume

Answer: docker volume prune

  • Which of the following actions allow you to scale an app? (select two)

Options are:

  • Change the replicas value in the docker-compose.yml file
  • Execute the ‘docker stack deploy’ command
  • Enable autoscaling
  • Execute the ‘docker scale’ command

Answer: Change the replicas value in the docker-compose.yml file Execute the ‘docker stack deploy’ command

  • Which of the following differences between user-defined bridges and the default bridge is FALSE?

Options are:

  • Linked containers on the default bridge network share environment variables.
  • Containers can be attached and detached from the default bridge network on the fly.
  • User-defined bridges provide better isolation and interoperability between containerized applications.
  • User-defined bridges provide automatic DNS resolution between containers.

Answer: Containers can be attached and detached from the default bridge network on the fly.

  • Which instruction sets the working directory for any RUN, CMD, ENTRYPOINT, COPY and ADD instructions that follow it in the Dockerfile?

Options are:

  • EXECFOLDER
  • PWD
  • RUNIN
  • WORKDIR

Answer: `WORKDIR`

  • Which docker feature enables each node in the swarm to accept connections on published ports for any service running in the swarm, even if there’s no task running on the node? Hint: The features also routes all incoming requests to published ports on available nodes to an active container.

Options are:

  • routing mesh
  • load balancer
  • VLANs
  • firewall

Answer: routing mesh

  • The major difference between a container and an image is?

Options are:

  • The size
  • The bottom writable layer
  • The top writable layer
  • There is no difference

Answer: The top writable layer

  • When the container starts, it can be connected to multiple networks using ‘ — network’

Options are:

  • TRUE
  • FALSE

Answer: FALSE

  • Which instruction adds metadata to an image?

Options are:

  • TAG
  • FROM
  • LABEL
  • ENTRYPOINT

Answer: LABEL

  • 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:

  • --force-init
  • --force-new-cluster
  • --restore
  • --force

Answer: --force-new-cluster

  • Which instruction capable of copying files to the filesystem of the image at the path dest is more feature-rich?

Options are:

  • COPY
  • ADD

Answer: ADD

  • Services might remain in a pending state in which of the following scenarios?

Options are:

  • When imposed placement constraints cannot be honored
  • The amount of memory reserved for a service cannot be satisfied
  • All nodes are paused or drained
  • All of the scenarios are valid

Answer: All of the scenarios are valid

  • You can configure DTR to use your own certificates, so that it is automatically trusted by your user's browser and client tools

Options are:

  • FALSE
  • TRUE

Answer: TRUE

  • Which docker components can be described as “an executable package that includes everything needed to run an application — the code, a runtime, libraries, environment variables, and configuration files”?

Options are:

  • Image
  • Node
  • Docker File
  • Container

Answer: Image

  • Which two modes does Docker provide for delivering messages from the container to the log driver?

Options are:

  • blocking
  • synchronous
  • asynchronous
  • non-blocking

Answer: blocking non-blocking

  • Each storage driver handles the implementation differently, but all drivers use stackable image layers and the copy-on-write (CoW) strategy.

Options are:

  • FALSE
  • TRUE

Answer: TRUE

  • By default, a container has no resource constraints and can use as much of a given resource as the host�s kernel scheduler allows.

Options are:

  • TRUE
  • FALSE

Answer: TRUE

  • Which command will drain a node that had a task assigned to it?

Options are:

  • docker task update drain
  • docker node update --availability maintenance
  • docker node update --availability drain
  • docker service update --availability drain

Answer: docker node update --availability drain

  • Which docker component can be described as “a runtime instance of an image”?

Options are:

  • Node
  • Container
  • Image
  • Docker File

Answer: Container

  • Services are really just containers in production.

Options are:

  • TRUE
  • FALSE

Answer: TRUE

  • The EXPOSE instruction does not actually publish the port.

Options are:

  • FALSE
  • TRUE

Answer: TRUE

  • Which instruction is used to set environmental variables?

Options are:

  • ENV
  • TAG
  • ENTRYPOINT
  • LABEL

Answer: ENV

  • With which type of mount is the data stored in the host system’s memory only?

Options are:

  • tempfs
  • bind mounts
  • volumes
  • Regular

Answer: tempfs

  • Which instruction informs Docker that a container listens on specified network ports at runtime?

Options are:

  • FROM
  • LABEL
  • TAG
  • EXPOSE

Answer: EXPOSE

  • When Docker is running in swarm mode, you cant run standalone containers on any of the Docker hosts participating in the swarm.

Options are:

  • TRUE
  • FALSE

Answer: FALSE

  • Which of the following is not a supported logging driver?

Options are:

  • syslog
  • none
  • azurelogs
  • awslogs
  • gcplogs

Answer: azurelogs

  • Which command shows information logged by a running container?

Options are:

  • docker logview
  • docker logs
  • docker container logs
  • docker log inspect

Answer: docker logs

  • Which flags of ‘docker swarm update’ enable and/or disable autolock on an existing swarm? (select two)

Options are:

  • --autolock=off
  • --autolock=on
  • --autolock=enable
  • --autolock=disable
  • --autolock=true
  • --autolock=false

Answer: --autolock=true --autolock=false

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

Options are:

  • bind mounts
  • tempfs
  • volumes
  • Regular

Answer: tempfs

  • Which command is used to create a user-defined bridge network?

Options are:

  • docker network create 'network name'
  • docker make network 'network name'
  • docker-network create 'network name'
  • docker network 'network name' create

Answer: docker network create 'network name'

  • Macvlan networks can be created in which of the following modes? (select two)

Options are:

  • Bridge mode
  • Promiscuous mode
  • Direct mode
  • 802.1q trunk bridge mode

Answer: Bridge mode 802.1q trunk bridge mode

  • Setting a node to DRAIN also removes standalone containers from that node, freeing it up completely.

Options are:

  • TRUE
  • FALSE

Answer: FALSE

  • How long after a container successfully starts does a docker restart policy start monitoring the container?

Options are:

  • 30 seconds
  • 10 seconds
  • 60 seconds
  • 5 seconds

Answer: 10 seconds

  • To have high-availability on UCP and DTR, you need a minimum of?

Options are:

  • 2 dedicated nodes to install UCP with high availability, and 3 dedicated nodes to install DTR with high availability.
  • 2 dedicated nodes to install UCP with high availability, and 2 dedicated nodes to install DTR with high availability.
  • 3 dedicated nodes to install UCP with high availability, and 2 dedicated nodes to install DTR with high availability.
  • 3 dedicated nodes to install UCP with high availability, and 3 dedicated nodes to install DTR with high availability

Answer: 3 dedicated nodes to install UCP with high availability, and 3 dedicated nodes to install DTR with high availability

  • Which type of mount has the side effect that you can change the host filesystem via processes running in a container, including creating, modifying, or deleting important system files or directories?

Options are:

  • Regular
  • bind mounts
  • volumes
  • tempfs

Answer: bind mounts

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store