DCA Practice Test Questions

166 Questions


You have deployed a service to swarm. Which command uses the Docker CLI to set the number of tasks of the services to 5? (choose 2)


A.

'docker service update --replicas=5 <service-id>'


B.

'docker replica update <service-id>=5'


C.

'docker update service <service-id>=5'


D.

'docker service replicas <service-id>=5'


E.

'docker service scale <service-id> = 5''





A.
  

'docker service update --replicas=5 <service-id>'



E.
  

'docker service scale <service-id> = 5''



You have created a Docker bridge network on a host with three containers attached, how do you make this containers accessible outside of the host?


A.

 Use network attach to access the containers on the bridge network


B.

Use either EXPOSE or --publish to access the containers on the bridge network


C.

Use network connect to access the containers on the bridge network


D.

Use --link to access the containers on the bridge network Correct





B.
  

Use either EXPOSE or --publish to access the containers on the bridge network



What is the purpose of multi-stage builds?


A.

Better logical separation of Dockerfile instructions for better readability


B.

Optimizing images by copying artifacts selectively from previous stages


C.

Better caching when building Docker images


D.

Faster image builds by allowing parallel execution of Docker builds





B.
  

Optimizing images by copying artifacts selectively from previous stages



When seven managers are in a swarm cluster how would they be distributed across three datacenters or
availability zones?


A.

5-1-1


B.

3-2-2


C.

3-3-1


D.

4-2-1





C.
  

3-3-1



What service mode is used to deploy a single task of a service to each node?


A.

replicated


B.

spread


C.

universal


D.

distributed


E.

global





E.
  

global



If installing Docker using devicemapper for storage with the Intent to run production workloads, how should devicemapper be configured


A.

direct-lvm


B.

loop-lvm


C.

overlay-lvm


D.

aufs-lvm





A.
  

direct-lvm



Which set of commands can identify the publishd port(s) for a container? (Choose 1.)


A.

'docker port inspect', 'docker container inspect'


B.

'docker container inspect', docker port'


C.

'docker info','docker network inspect'


D.

'docker network inspect','docker port'





B.
  

'docker container inspect', docker port'



Which of the following modes can be used for service discovery of a Docker swarm service (Pick 2 correct answers)


A.

Virtual IP (VIP) with --endpoint-mode vip


B.

Overlay with --endpoint-mode overlay


C.

DNS Round-Robin with --endpoint-mode dnsrr


D.

Ingress with --endpoint-mode ingress


E.

Network Address Translation(NAT) with --endpoint-mode nat





A.
  

Virtual IP (VIP) with --endpoint-mode vip



C.
  

DNS Round-Robin with --endpoint-mode dnsrr



Which of the following commands will ensure that overlay traffic between service tasks is encrypted?


A.

docker service create --network <network-name> --secure <service-name>


B.

docker network create -d overlay --secure <network-name>


C.

docker network create -d overlay -o encrypted=true <network-name>


D.

docker service create --network <network-name> --encrypted <service-name>





C.
  

docker network create -d overlay -o encrypted=true <network-name>



Which of the following commands will create a swarm service which only listens on port 53 using the UDP protocol?


A.

docker service create --name dns-cache -p 53:53/udp dns-cache


B.

docker service create --name dns-cache -p 53:53 --service udp dns-cache


C.

docker service create --name dns-cache -p 53:53 ..constraint
networking.protocol.udp=true dns-cache


D.

docker service create --name dns-cache -p 53:53 --udp dns-cache





A.
  

docker service create --name dns-cache -p 53:53/udp dns-cache



The output of which command can be used to find the architecture and operating system an image is
compatible with?


A.

docker image inspect --filter {{.Architecture}} {{.OS}} ' <image-id>


B.

docker image ls <image-id>


C.

docker image inspect --format {{.Architecture}} {{.OS}} ' <image-id>


D.

docker image info <image-id>





C.
  

docker image inspect --format {{.Architecture}} {{.OS}} ' <image-id>



Which of the following is true about overlay networks?


A.

Overlay networks are created only on the manager node that you created the overlay
networking on


B.

Overlay networks are created on all cluster nodes when you create the overlay network.


C.

Overlay networks are first created on the manager nodes. Then they are created on the
worker nodes once a task is scheduled on the specific worker node.


D.

Overlay networks are only created on the manager nodes





B.
  

Overlay networks are created on all cluster nodes when you create the overlay network.




Page 1 out of 14 Pages