Docker Certified Associate (DCA) Practice Exams Set 22

Which of the following tasks can we perform to set a custom DNS server for a container?


Options are :

  • We can use the --nameserver flag with docker run .
  • We can use the --dns-override flag with docker run
  • We can set "dns" in /etc/docker/daemon.json . .
  • We can use the --dns flag with docker run .

Answer : We can use the --dns flag with docker run .

What is the docker command to create a bridge network?


Options are :

  • docker network add
  • docker create network
  • docker network deploy
  • docker network create

Answer : docker network create

Docker Certified Associate (DCA) Practice Exams Set 14

What is the docker command to see the storage driver Docker is currently using?


Options are :

  • docker inspect
  • docker info
  • docker status
  • docker config

Answer : docker info

Which of the followings are Docker Engine Security features? (select all that apply)


Options are :

  • You can protect the Docker daemon socket and ensure only trusted docker client connection.
  • You can configure Docker’s trust features so that your users can push and pull trusted images.
  • You can configure secure computing mode (Seccomp) policies to secure system calls in container
  • You can use certificate-based client server authentication to verify a docker deamon has the rights to access image on registry.

Answer : You can protect the Docker daemon socket and ensure only trusted docker client connection. You can configure Docker’s trust features so that your users can push and pull trusted images. You can configure secure computing mode (Seccomp) policies to secure system calls in container You can use certificate-based client server authentication to verify a docker deamon has the rights to access image on registry.

Tommy has some nodes with labels that specify the availability zone of each node. He wants to run a service that can run tasks on any node and that do not have the label availability_zone=east . Which command should he use?


Options are :

  • docker service create –constraint node.labels.availability_zone!=east nginx
  • docker service create –label node.labels.availability_zone!=east nginx
  • docker service create –constraint node.labels.availability_zone==west nginx
  • docker service create --placement-pref node.labels.availability_zone==west nginx

Answer : docker service create –constraint node.labels.availability_zone!=east nginx

Docker Certified Associate (DCA) Practice Exams Set 6

Which storage driver is the default for CentOS 7 and earlier?


Options are :

  • aufs
  • loop-lvm
  • overlay2
  • devicemapper

Answer : devicemapper

Which of the following commands can we use to locate the actual files that store a container's internal data?


Options are :

  • docker volume ls
  • docker image inspect
  • docker container inspect
  • docker container volume ls

Answer : docker container inspect

Which devicemapper mode should we use for a production environment?


Options are :

  • overlay2
  • block storage
  • loop-lvm
  • direct-lvm

Answer : direct-lvm

Docker Certified Associate (DCA) Practice Exams Set 22

Which of the following commands can we utilize to list all of the replicas that are part of a service?


Options are :

  • docker container ls
  • docker service ps nginx
  • docker ps
  • docker service get nginx

Answer : docker service ps nginx

What type of network is ingress network?


Options are :

  • host network
  • bridge network
  • overlay network
  • macvlan network

Answer : overlay network

Which of the following commands would we use to retrieve a list of volumes on the current machine?


Options are :

  • docker volume rm
  • docker volume ls
  • docker volume inspect
  • docker volume ps

Answer : docker volume ls

Docker Certified Associate (DCA) Practice Exams Set 18

We have a group of people who need similar permissions in Universal Control Plane (UCP). How can we manage their permissions as a group without having to assign individual permissions to each user manually?


Options are :

  • Create a GrantBundle and assign it to each user.
  • Assign the users to a team, and then assign grants to the entire team, giving them the permissions they need.
  • Add grants to one user to give them the permissions they need, and then copy that user's permissions to the other users.
  • Create a role with several permissions assigned, and then assign each user to that shared role.

Answer : Assign the users to a team, and then assign grants to the entire team, giving them the permissions they need.

Which of the following statements is false?


Options are :

  • Containers can NOT be attached and detached from user-defined networks on the fly.
  • User-defined bridges provide better isolation and interoperability between containerized applications.
  • Linked containers on the default bridge network share environment variables.
  • Each user-defined network creates a configurable bridge

Answer : User-defined bridges provide better isolation and interoperability between containerized applications.

Which of the following statements about grants in the Universal Control Plane (UCP) is accurate?


Options are :

  • A grant provides permissions concerning precisely one object.
  • Grants can give permissions to a user, team, or organization.
  • Each grant refers to one or more roles.
  • For each user, only one grant may be assigned.

Answer : Grants can give permissions to a user, team, or organization.

Docker Certified Associate (DCA) Practice Exams Set 12

We have a Docker host that is running low on storage. What command could help us identify how the host is using storage?


Options are :

  • docker system df
  • docker container ls
  • docker image prune
  • docker image inspect

Answer : docker system df

What is the docker command to add a node to a swarm?


Options are :

  • docker join swarm
  • docker swarm join
  • docker swarm add-node
  • docker swarm create-node

Answer : docker swarm join

Which flag allows us to return specific fields with docker inspect ?


Options are :

  • --filter
  • --field-limit
  • --format
  • --pretty

Answer : --format

Docker Certified Associate (DCA) Practice Exams Set 6

Which of the following is NOT true about Raft (docker consensus algorithm)?


Options are :

  • Raft tolerates up to (N-2)/2 failures.
  • If a quorum is not reached, the system will not process any more requests to schedule additional tasks.
  • If a quorum is not reached, the existing tasks will keep running.
  • Raft requires a majority or quorum of (N/2) + 1 members.

Answer : Raft tolerates up to (N-2)/2 failures.

Which network driver type is best when the network stack should not be isolated from the Docker host, but you want other aspects of the container to be isolated?



Options are :

  • Host networks
  • User-defined bridge networks
  • Macvlan networks
  • Overlay networks

Answer : Host networks

When creating an overlay network, what flag can we use to allow containers to attach to the network after it is created?


Options are :

  • --attachable
  • --network-driver attachable
  • --attach=true
  • --open true

Answer : --attachable

Docker Certified Associate (DCA) Practice Exams Set 4

Which command allows us to create an encrypted overlay network?


Options are :

  • docker network create --opt encrypted my-net
  • docker network create --opt encrypted --driver overlay my-net
  • docker network create --secure --driver overlay mynet
  • docker network create --encrypted --driver overlay my-net

Answer : docker network create --opt encrypted --driver overlay my-net

Which of the following is how to configure the Docker daemon to start on boot? (select two)


Options are :

  • Use upstart for Ubuntu 14.10 and below
  • Use crond for Ubuntu 14.10 and below
  • Use systemd for most current Linux distributions (RHEL, CentOS, Fedora, Ubuntu 16.04 and higher)
  • Use startup for most current Linux distributions (RHEL, CentOS, Fedora, Ubuntu 16.04 and higher)

Answer : Use upstart for Ubuntu 14.10 and below Use systemd for most current Linux distributions (RHEL, CentOS, Fedora, Ubuntu 16.04 and higher)

Which network driver type is best when you need containers running on different Docker hosts to communicate, or when multiple applications work together using swarm services?


Options are :

  • Overlay networks
  • Macvlan networks
  • Host networks
  • User-defined bridge networks

Answer : Overlay networks

Docker Certified Associate (DCA) Practice Exams Set 26

Which of the following statements about the overlay network driver is accurate?


Options are :

  • The network must be set up manually on each node.
  • The network is set up on every node in the cluster as soon as the network faces creation.
  • Networking components are created on nodes dynamically when tasks get scheduled on the node.
  • The overlay driver only allows communication between containers running on the same host.

Answer : Networking components are created on nodes dynamically when tasks get scheduled on the node.

In terms of establishing a high level of availability, what is the benefit of having more manager nodes present in a swarm?


Options are :

  • It would result in being more efficient with resources.
  • It would allow for more worker nodes to be present.
  • The cluster would be easier to set up.
  • It would help bolster fault-tolerance.

Answer : It would help bolster fault-tolerance.

How would we create a volume called new-volume without running a container?


Options are :

  • We would use docker run -v new-volume:/tmp nginx .
  • We would run docker create volume new-volume .
  • We would run docker run --rm -v new-volume:/tmp nginx .
  • We would run docker volume create new-volume .

Answer : We would run docker volume create new-volume .

Docker Certified Associate (DCA) Practice Exams Set 5

What is the docker command to connect a running container to an existing user-defined bridge?


Options are :

  • docker network connect
  • docker network join
  • docker network attach
  • docker connect network

Answer : docker network connect

Which of the following is NOT one of the 3 main Docker Container Network Model components?


Options are :

  • Endpoint
  • Network
  • Routing
  • Sandbox

Answer : Routing

What is the docker command to add or update a placement constraint?


Options are :

  • docker service update --placement-pref-add
  • docker service update --constraint-add
  • docker service update --placement-constraint-add
  • docker service update --pref-add

Answer : docker service update --constraint-add

Docker Certified Associate (DCA) Practice Exams Set 9

Which of the below correct command to list the tasks associated with stack?



Options are :

  • docker stack services STACKNAME
  • docker stack ps STACKNAME
  • docker stack task STACKNAME
  • docker stack ls STACKNAME

Answer : docker stack ps STACKNAME

Which Command valid for with private registry.


Options are :

  • docker pull
  • docker push
  • docker login
  • docker search

Answer : docker search

What is an easy way to configure a client to communicate with Universal Control Plane (UCP) using client certificates?


Options are :

  • We can execute the docker login command.
  • We can download and use a client bundle.
  • docker ucp login
  • We can log into UCP via a browser.

Answer : We can download and use a client bundle.

Docker Certified Associate (DCA) Practice Exams Set 21

Which of the following commands will create a new bridge network?


Options are :

  • docker network create --driver overlay my-network
  • docker network create --network-driver bridge mynetwork
  • docker network create --network bridge my-network
  • docker network create my-network

Answer : docker network create my-network

Which of the following commands would we use to automatically identify and delete images that are not being used?


Options are :

  • docker image rm --all
  • docker image rm
  • docker image rm -a
  • docker image prune

Answer : docker image prune

Which of below command used to remove dangling images  (image not reference by any tag or container) from the host.




Options are :

  • docker rm
  • docker image prune -t
  • docker image prune
  • docker image prune -a

Answer : docker image prune

Docker Certified Associate (DCA) Practice Exams Set 7

What component of the Docker Container Networking Model (CNM) refers to a collection of endpoints that can communicate with one another?


Options are :

  • Network
  • IP Address Management (IPAM) Driver
  • Sandbox
  • Network device

Answer : Network

Which of the following commands would we use to locate the data for a volume on the host?


Options are :

  • docker volume navigate
  • docker volume inspect
  • docker volume logs
  • docker volume locate

Answer : docker volume inspect

Which of the following commands would we use to view a container's logs?


Options are :

  • docker container get-log
  • sudo journalctl -u docker
  • docker logs
  • docker service logs

Answer : docker logs

Docker Certified Associate (DCA) Practice Exams Set 2

Which of the following network drivers is the default for connecting containers on the same host?


Options are :

  • macvlan
  • bridge
  • host
  • overlay

Answer : bridge

Which of the following network drivers is the default for connecting containers on the same host?


Options are :

  • The none driver implements sandboxes.
  • The none driver implements communication between containers.
  • The none driver does not provide network isolation between containers.
  • The none driver is the default when no driver is selected.

Answer : The none driver implements sandboxes.

What Linux feature does Docker use to allow containers to listen on ports lower than 1024 without running as root on the host?


Options are :

  • Namespaces
  • Linux jails
  • Control Groups
  • Capabilities

Answer : Capabilities

Docker Certified Associate (DCA) Practice Exams Set 9

Which of the following commands will evenly spread out tasks based upon the values of a node label?


Options are :

  • docker service create –constraint spread=node.labels.availability_zone nginx
  • docker service create --placement-pref spread=node.labels.availability_zone nginx
  • docker service create --placement-pref spread nginx
  • docker service create --placement-pref evenspread=node.labels.availability_zone nginx

Answer : docker service create --placement-pref spread=node.labels.availability_zone nginx

What is the docker command to add a placement preference?


Options are :

  • docker service update --placement-constraint-add
  • docker service update --pref-add
  • docker service update --placement-pref-add
  • docker service update --constraint-add

Answer : docker service update --placement-pref-add

Amanda is having some network issues and needs to do some troubleshooting. How can she inject a nicolaka/netshoot container into the sandbox of an existing container called nginx-container.


Options are :

  • Amanda can use docker run --network container:nginxcontainer nicolaka/netshoot .
  • Amanda can use docker run --inject-container nginxcontainer nicolaka/netshoot .
  • Amanda can use docker run --network nginx-container nicolaka/netshoot .
  • Amanda can use docker run --network-debug nginxcontainer nicolaka/netshoot .

Answer : Amanda can use docker run --network container:nginxcontainer nicolaka/netshoot .

Docker Certified Associate (DCA) Practice Exams Set 5

Publishing a service's port using the routing mesh makes the service accessible at the published port on every swarm node. True or false?


Options are :

  • TRUE
  • FALSE

Answer : TRUE

Comment / Suggestion Section
Point our Mistakes and Post Your Suggestions
  • Which Command valid for with private registry.
    
    
    Options are :
    
    docker pull
    docker push
    docker login
    docker search
    Answer : docker search
    
    qn is confusing. without login how search in private registry works ? so docker login will be answer in my opinion
    Reply
  • Which flag allows us to return specific fields with docker inspect ?
    
    
    Options are :
    
    --filter   ---> good answer
    --field-limit
    --format
    --pretty
    Answer : --format
    Reply
  • User
    Which of the following statements is false?
    
    
    Options are :
    
    Containers can NOT be attached and detached from user-defined networks on the fly. --> good answer
    User-defined bridges provide better isolation and interoperability between containerized applications.
    Linked containers on the default bridge network share environment variables.
    Each user-defined network creates a configurable bridge
    Answer : User-defined bridges provide better isolation and interoperability between containerized applications.
    Reply
    • agree
      Reply