Weekend Sale Limited Time Flat 70% Discount offer - Ends in 0d 00h 00m 00s - Coupon code: 70spcl

Docker DCA Docker Certified Associate (DCA) Exam Exam Practice Test

Page: 1 / 19
Total 191 questions

Docker Certified Associate (DCA) Exam Questions and Answers

Question 1

During development of an application meant to be orchestrated by Kubernetes, you want to mount the /data directory on your laptop into a container.

Will this strategy successfully accomplish this?

Solution: Add a volume to the pod that sets hostPath.path: /data, and then mount this volume into the pod's containers as desired.

Options:

A.

Yes

B.

No

Question 2

During development of an application meant to be orchestrated by Kubernetes, you want to mount the /data directory on your laptop into a container.

Will this strategy successfully accomplish this?

Solution. Set containers. Mounts. hostBinding: /data in the container's specification.

Options:

A.

Yes

B.

No

Question 3

Will this command mount the host's '/data* directory to the ubuntu container in read-only mode?

Solution. ‘docker run -add-volume /data /mydata -read-only ubuntu'

Options:

A.

Yes

B.

No

Question 4

How do you change the default logging driver for the docker daemon in Linux?

Options:

A.

Install a logging agent on the Linux host.

B.

Set the value of 'log-driver' to the name of the logging driver in the daemon.json in /etc/docker.

C.

Use the -log-driver1 flag when you run a container.

D.

At the command line, type: docker log driver set

Question 5

Two pods bear the same label, app: dev.

Will a label selector matching app: dev match both of these pods?

Options:

A.

Yes, if the pods are in the same Kubernetes namespace as the object bearing the label selector.

B.

Yes, if the pods are in the same Kubernetes namespace as the object bearing the label selector and both pods were pre-existing when the label selector was declared.

C.

Yes, if both pods were pre-existing when the label selector was declared.

D.

Yes, as long as all the containers in those pods are passing their livenessProbes and readinessProbes.

Question 6

One of several containers in a pod is marked as unhealthy after failing its livenessProbe many times. Is this the action taken by the orchestrator to fix the unhealthy container?

Solution: The unhealthy container is restarted.

Options:

A.

Yes

B.

No

Question 7

Your organization has a centralized logging solution, such as Splunk.

Will this configure a Docker container to export container logs to the logging solution?

Solution.docker logs

Options:

A.

Yes

B.

No

Question 8

You add a new user to the engineering organization in DTR.

Will this action grant them read/write access to the engineering/api repository?

Solution. Mirror the engineering/api repository to one of the user's own private repositories.

Options:

A.

Yes

B.

No

Question 9

You want to create a container that is reachable from its host's network.

Does this action accomplish this?

Solution: Use network attach to access the container on the bridge network.

Options:

A.

Yes

B.

No

Question 10

A persistentVolumeClaim (PVC) is created with the specification storageClass: "", and size requirements that cannot be satisfied by any existing persistentVolume.

Is this an action Kubernetes takes in this situation?

Solution: The PVC remains unbound until a persistentVolume that matches all requirements of the PVC becomes available.

Options:

A.

Yes

B.

No

Question 11

Will this command ensure that overlay traffic between service tasks is encrypted?

Solution: docker network create -d overlay -o encrypted=true

Options:

A.

Yes

B.

No

Question 12

Will this command list all nodes in a swarm cluster from the command line?

Solution: 'docker node Is'

Options:

A.

Yes

B.

No

Question 13

Can this set of commands identify the published port(s) for a container?

Solution. ‘docker container inspect", docker port'

Options:

A.

Yes

B.

No

Question 14

In Docker Trusted Registry, is this how a user can prevent an image, such as 'nginx:latest’, from being overwritten by another user with push access to the repository?

Solution: Keep a backup copy of the image on another repository.

Options:

A.

Yes

B.

No

Question 15

Is this a way to configure the Docker engine to use a registry without a trusted TLS certificate?

Solution: Pass the '--insecure-registry' flag to the daemon at run time.

Options:

A.

Yes

B.

No

Question 16

Does this command display all the pods in the cluster that are labeled as env; development'?

Solution. ‘kubectl gel pods --all-namespaces -I 'env in (development)''

Options:

A.

Yes

B.

No

Question 17

In Kubernetes, to mount external storage to a filesystem path in a container within a pod, you would use a volume in the pod specification. This volume is populated with a persistentVolumeClaim that is bound to an existing persistentVolume. The persistentVolume is defined and managed by the storageClass which provides dynamic or static provisioning of the volume and determines what type of storage will be provided1. References:

•Dynamic Volume Provisioning | Kubernetes

Is this a supported user authentication method for Universal Control Plane?

Solution: Docker ID

Options:

A.

Yes

B.

No

Question 18

In Docker Trusted Registry, is this how a user can prevent an image, such as 'nginx:latest’, from being overwritten by another user with push access to the repository?

Solution: Tag the image with 'nginx:immutable'.

Options:

A.

Yes

B.

No

Question 19

Will this command mount the host's '/data1directory to the ubuntu container in read-only mode?

Solution. ‘docker run -v /data:/mydata -mode readonly ubuntu'

Options:

A.

Yes

B.

No

Question 20

You want to create a container that is reachable from its host's network.

Does this action accomplish this?

Solution.Use network connect to access the container on the bridge network.

Options:

A.

Yes

B.

No

Question 21

An application image runs in multiple environments, with each environment using different certificates and ports.

Is this a way to provision configuration to containers at runtime?

Solution: Create images that contain the specific configuration for every environment.

Options:

A.

Yes

B.

No

Question 22

Is this an advantage of multi-stage builds?

Solution: optimizes Images by copying artifacts selectively from previous stages

Options:

A.

Yes

B.

No

Question 23

You configure a local Docker engine to enforce content trust by setting the environment variable

DOCKER_CONTENT_TRUST=1.

If myorg/myimage: 1.0 is unsigned, does Docker block this command?

Solution: docker container run myorg/myimage:1.0

Options:

A.

Yes

B.

No

Question 24

Which networking drivers allow you to enable multi-host network connectivity

between containers?

Options:

A.

macvlan, ipvlan, and overlay

B.

bridge, user-defined, host

C.

host, macvlan, overlay, user-defined

D.

bridge, macvlan, ipvlan, overlay

Question 25

You want to create a container that is reachable from its host's network. Does this action accomplish this?

Solution:Use network attach to access the containers on the bridge network

Options:

A.

Yes

B.

No

Question 26

The Kubernetes yaml shown below describes a networkPolicy.

Question # 26

Will the networkPolicy BLOCK this trafftc?

Solution. a request issued from a pod bearing the tier: backend label, to a podbearing the tier: frontend label

Options:

A.

Yes

B.

No

Question 27

Will this command display a list of volumes for a specific container?

Solution. ‘docker container logs nginx –volumes’

Options:

A.

Yes

B.

No

Question 28

In the context of a swarm mode cluster, does this describe a node?

Solution: an instance of the Docker engine participating in the swarm

Options:

A.

Yes

B.

No

Question 29

Is this a way to configure the Docker engine to use a registry without a trusted TLS certificate?

Solution. Set and export the IGNORE_TLS environment variable on the command line.

Options:

A.

Yes

B.

No

Question 30

Will this sequence of steps completely delete an image from disk in the Docker Trusted Registry?

Solution: Delete the image and delete the image repository from Docker Trusted Registry

Options:

A.

Yes

B.

No

Question 31

Will this command ensure that overlay traffic between service tasks is encrypted?

Solution:docker network create -d overlay --secure

Options:

A.

Yes

B.

No

Question 32

Will this action upgrade Docker Engine CE to Docker Engine EE?

Solution: Uninstall 'docker-ce' package before installing 'docker-ee' package.

Options:

A.

Yes

B.

No

Question 33

Is this a type of Linux kernel namespace that provides container isolation?

Solution: Network

Options:

A.

Yes

B.

No

Question 34

Is this statement correct?

Solution: A Dockerfile stores the Docker daemon's configuration options.

Options:

A.

Yes

B.

No

Question 35

The following Docker Compose file is deployed as a stack:

Question # 35

Is this statement correct about this health check definition?

Solution: Health checks test for app health ten seconds apart. Three failed health checks transition the container into “unhealthy” status.

Options:

A.

Yes

B.

No

Question 36

Is this a type of Linux kernel namespace that provides container isolation?

Solution.Process ID

Options:

A.

Yes

B.

No

Question 37

A persistentVolumeClaim (PVC) is created with the specification storageClass: "".and size requirements that cannot be satisfied by any existing persistentVolume.

Is this an action Kubernetes takes in this situation?

Solution: Kubernetes returns an error indicating that the PVC could not be bound with the current resources.

Options:

A.

Yes

B.

No

Question 38

Will this sequence of steps completely delete an image from disk in the Docker Trusted Registry?

Solution.Delete the image and remove permissions to the repository in the Docker

Trusted Registry.

Options:

A.

Yes

B.

No

Question 39

You add a new user to the engineering organization in DTR.

Will this action grant them read/write access to the engineering/api repository?

Solution: Add them to a team in the engineering organization that has read/write access to the engineering/api repository.

Options:

A.

Yes

B.

No

Question 40

Is this a supported user authentication method for Universal Control Plane?

Solution.x.500

Options:

A.

Yes

B.

No

Question 41

A users attempts to set the system time from inside a Docker container are unsuccessful. Could this be blocking this operation?

Solution: Linux capabilities

Options:

A.

Yes

B.

No

Question 42

Will this command ensure that overlay traffic between service tasks is encrypted?

Solution:docker service create --network --secure

Options:

A.

Yes

B.

No

Question 43

Can this set of commands identify the published port(s) for a container?

Solution: docker container inspect', 'docker port'

Options:

A.

Yes

B.

No

Question 44

What is the difference between the ADD and COPY Dockerfile instructions? (Select two.)

Options:

A.

ADD supports remote URL handling while COPY does not.

B.

COPY supports compression format handling while ADD does not.

C.

COPY supports regular expression handling while ADD does not.

D.

ADD supports regular expression handling while COPY does not.

E.

ADD supports compression format handling while COPY does not.

Question 45

A company's security policy specifies that development and production containers must run on separate nodes in a given Swarm cluster. Can this be used to schedule containers to meet the security policy requirements?

Solution.label constraints

Options:

A.

Yes

B.

No

Question 46

Will this command mount the host's '/data' directory to the ubuntu container in read-only mode?

Solution: 'docker run -v /data:/mydata --mode readonly ubuntu'

Options:

A.

Yes

B.

No

Question 47

You are pulling images from a Docker Trusted Registry installation

configured to use self-signed certificates, and this error appears:

`x509: certificate signed by unknown authority.

You already downloaded the Docker Trusted Registry certificate authority

certificate from https://dtr.example.com/ca.

How do you trust it? (Select two.)

Options:

A.

Pass '-trust-certificate ca.crt to the Docker client.

B.

Place the certificate in '/etc/docker/dtr/dtr.example.com.crt' and restart theDocker daemon on all cluster nodes.

C.

Place the certificate in /etc/docker/certs.d/dtr.example.com/ca.crt' on allcluster nodes.

D.

Pass -- insecure-registry to the Docker client.

E.

Place the certificate in your OS certificate path, trust the certificate system-wide, and restart the Docker daemon across all cluster nodes.

Question 48

Are these conditions sufficient for Kubernetes to dynamically provision a persistentVolume, assuming there are no limitations on the amount and type of available external storage?

Solution: A persistentVolumeClaim is created that specifies a pre-defined provisioner.

Options:

A.

Yes

B.

No

Question 49

You configure a local Docker engine to enforce content trust by setting the environment variable DOCKER_C0NTENT_TRUST=l. If myorg/myimage: 1.0 is unsigned, does Docker block this command?

Solution.docker image build, from a Dockeflle that begins FROM myorg/myimage: l1.0

Options:

A.

Yes

B.

No

Question 50

Is this the purpose of Docker Content Trust?

Solution.Sign and verify image tags.

Options:

A.

Yes

B.

No

Question 51

Will this Linux kernel facility limit a Docker container's access to host resources, such as CPU or memory?

Solution: seccomp

Options:

A.

Yes

B.

No

Question 52

You want to mount external storage to a particular filesystem path in a

container in a Kubernetes pod.

What is the correct set of objects to use for this?

Options:

A.

a persistentVolume in the pod specification, populated with a persistentVolumeClaim which is bound to a volume defined by a storageClass

B.

a storageClass in the pod's specification, populated with a volume which is bound to a provisioner defined by a persistentVolume

C.

a volume in the pod specification, populated with a storageClass which is bound to a provisioner defined by a persistentVolume

D.

a volume in the pod specification, populated with a persistentVolumeClaim bound to a persistentVolume defined by a storageClass

Question 53

Your organization has a centralized logging solution, such as Splunk.

Will this configure a Docker container to export container logs to the logging solution?

Solution: docker logs

Options:

A.

Yes

B.

No

Question 54

Will this configuration achieve fault tolerance for managers in a swarm?

Solution: only two managers, one active and one passive.

Options:

A.

Yes

B.

No

Question 55

A users attempts to set the system time from inside a Docker container are unsuccessful. Could this be blocking this operation?

Solution: inter-process communication

Options:

A.

Yes

B.

No

Question 56

Does this command create a swarm service that only listens on port 53 using the UDP protocol?

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

Options:

A.

Yes

B.

No

Question 57

Is this statement correct?

Solution.A Dockerfile stores persistent data between deployments of a container

Options:

A.

Yes

B.

No

Page: 1 / 19
Total 191 questions