ExamGecko
Home Home / Docker / DCA

Docker DCA Practice Test - Questions Answers, Page 7

Question list
Search
Search

List of questions

Search

Related questions











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

Solution: docker volume logs nginx --containers'

A.

Yes

A.

Yes

Answers
B.

No

B.

No

Answers
Suggested answer: B

Explanation:

= I cannot give you a comprehensive explanation, but I can tell you that the command is not correct.The docker volume command is used to manage volumes, not to display logs1.The docker logs command is used to display the logs of a container2. The solution suggests using docker volume logs nginx --containers, which is not a valid syntax.To display the list of volumes for a specific container, you can use the docker inspect command with a filter option3.For example, docker inspect -f '{{ .Mounts }}' nginx will show the volumes mounted by the nginx container4. You will need to understand how to use the docker commands and options to answer this question correctly.Reference:

Docker volume command documentation:1

Docker logs command documentation:2

Docker inspect command documentation:3

How to list volumes of a container:4

I hope this helps you prepare for your DCA exam. If you want to practice more questions, you can check out some of the online courses that offer practice exams, such as5,6, [7], [8], and [9]. Good luck!

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

Solution: docker volume inspect nginx'

A.

Yes

A.

Yes

Answers
B.

No

B.

No

Answers
Suggested answer: B

Explanation:

= The commanddocker volume inspect nginxwill not display a list of volumes for a specific container.This is becausedocker volume inspectexpects one or more volume names as arguments, not a container name1.To display a list of volumes for a specific container, you can use thedocker inspectcommand with the--formatoption and a template that extracts the volume information from the container JSON output2. For example, to display the source and destination of the volumes mounted by the containernginx, you can use the following command:

docker inspect --format=' { {range .Mounts}} { {.Source}}: { {.Destination}} { {end}}' nginx

docker volume inspect | Docker Docs

docker inspect | Docker Docs

Does this describe the role of Control Groups (cgroups) when used with a Docker container?

Solution: user authorization to the Docker API

A.

Yes

A.

Yes

Answers
B.

No

B.

No

Answers
Suggested answer: B

Explanation:

= The role of Control Groups (cgroups) when used with a Docker container isnotuser authorization to the Docker API.Cgroups are a feature of the Linux kernel that allow you to limit the access processes and containers have to system resources such as CPU, RAM, IOPS and network1.Cgroups enable Docker to share available hardware resources to containers and optionally enforce limits and constraints2.User authorization to the Docker API is a different concept that involves granting permissions to users or groups to perform certain actions on the Docker daemon, such as creating, running, or stopping containers3.

Lab: Control Groups (cgroups) | dockerlabs

Runtime metrics | Docker Docs

Authorize users to access the Docker API | Docker Docs

I hope this helps you understand the role of cgroups and how they work with Docker containers. If you have any other questions related to Docker, please feel free to ask me.

Does this describe the role of Control Groups (cgroups) when used with a Docker container?

Solution: role-based access control to clustered resources

A.

Yes

A.

Yes

Answers
B.

No

B.

No

Answers
Suggested answer: B

Explanation:

= The role of Control Groups (cgroups) when used with a Docker container isnotrole-based access control to clustered resources.Cgroups are a feature of the Linux kernel that allow you tolimit, manage, and isolate resource usageof collections of processes running on a system1.Resources are CPU time, system memory, network bandwidth, or combinations of these resources, and so on2.Cgroups allow Docker Engine to share available hardware resources to containers and optionally enforce limits and constraints3.Cgroups can help avoid ''noisy neighbor'' issues and improve the performance and security of containers4.Role-based access control (RBAC) is a different concept that refers to controlling access to resources based on the roles of individual users within an organization5.

Does this describe the role of Control Groups (cgroups) when used with a Docker container?

Solution: accounting and limiting of resources

A.

Yes

A.

Yes

Answers
B.

No

B.

No

Answers
Suggested answer: A

Explanation:

= Control Groups (cgroups) are a feature of the Linux kernel that allow you to limit the access processes and containers have to system resources such as CPU, memory, disk I/O, network, and so on1.Control groups allow Docker Engine to share available hardware resources to containers and optionally enforce limits and constraints2.For example, you can use the docker run command to specify the CPU shares, memory limit, or network bandwidth for a container3.By using cgroups, you can ensure that each container gets the resources it needs and prevent resource starvation or overcommitment4.Reference:

Lab: Control Groups (cgroups) | dockerlabs

Runtime metrics | Docker Docs

Docker run reference | Docker Docs

Docker resource management via Cgroups and systemd

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

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

A.

Yes

A.

Yes

Answers
B.

No

B.

No

Answers
Suggested answer: A

Explanation:

The commanddocker network create -d overlay -o encrypted=true <network-name>will ensure that overlay traffic between service tasks is encrypted. This command creates an overlay network with the encryption option enabled, which means that Docker will create IPSEC tunnels between all the nodes where tasks are scheduled for services attached to the overlay network.These tunnels use the AES algorithm in GCM mode and manager nodes automatically rotate the keys every 12 hours1. This way, the data exchanged between containers on different nodes on the overlay network is secured.Reference:

Overlay network driver

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

Solution: docker network create -d overlay --secure

A.

Yes

A.

Yes

Answers
B.

No

B.

No

Answers
Suggested answer: B

Explanation:

= I cannot give you a comprehensive explanation, but I can tell you that the command is not correct.The docker network create command is used to create a new network, not to encrypt an existing one1.The -d option specifies the driver to use for the network, which in this case is overlay1.The overlay driver enables multi-host networking for swarm services2.The --secure option is not a valid option for the docker network create command1.To ensure that overlay traffic between service tasks is encrypted, you need to use the --opt encrypted option2.For example, docker network create -d overlay --opt encrypted my-net will create an overlay network named my-net with encryption enabled2. You will need to understand how to use the docker network command and how to configure overlay networks to answer this question correctly.Reference:

Docker network create command documentation:1

Overlay network encryption documentation:2

I hope this helps you prepare for your DCA exam. If you want to practice more questions, you can check out some of the online courses that offer practice exams, such as3,4,5,6, and [7]. Good luck!

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

Solution: docker service create --network--secure

A.

Yes

A.

Yes

Answers
B.

No

B.

No

Answers
Suggested answer: B

Explanation:

: = The commanddocker service create --network --securewill not ensure that overlay traffic between service tasks is encrypted.This is because the--secureoption is not a valid option for thedocker service createcommand1.To ensure that overlay traffic between service tasks is encrypted, you need to use the--opt encryptedoption when creating the overlay network with thedocker network createcommand2. For example, to create an encrypted overlay network namedmy-net, you can use the following command:

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

Then, you can use the--network my-netoption when creating the service with thedocker service createcommand3. For example, to create a service namedmy-serviceusing thenginximage and themy-netnetwork, you can use the following command:

docker service create --name my-service --network my-net nginx

docker service create | Docker Docs

Use overlay networks | Docker Docs

Create a service | Docker Docs

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

Solution: docker service create --network--encrypted

A.

Yes

A.

Yes

Answers
B.

No

B.

No

Answers
Suggested answer: B

Explanation:

= The command docker service create --network --encrypted willnotensure that overlay traffic between service tasks is encrypted.This is because the --network flag requires an argument that specifies the name or ID of the network to connect the service to1.The --encrypted flag isnota valid option for docker service create2.To encrypt overlay traffic between service tasks, you need to use the --opt encrypted flag on docker network create when you create the overlay network3. For example:

docker network create --opt encrypted --driver overlay my-encrypted-network

Then, you can use the --network flag on docker service create to connect the service to the encrypted network. For example:

docker service create --network my-encrypted-network my-service

docker service create | Docker Documentation

docker service create | Docker Documentation

Manage swarm service networks | Docker Docs

I hope this helps you understand the command and the encryption, and how they work with Docker and swarm. If you have any other questions related to Docker, please feel free to ask me.

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

Solution: Use --link to access the container on the bridge network.

A.

Yes

A.

Yes

Answers
B.

No

B.

No

Answers
Suggested answer: B

Explanation:

= The action of using--linkto access the container on the bridge network doesnotaccomplish the goal of creating a container that is reachable from its host's network.The--linkoption allows you to connect containers that are running on the same network, but it doesnotexpose the container's ports to the host1.To create a container that is reachable from its host's network, you need to use the--network hostoption, which attaches the container to the host's network stack and makes it share the host's IP address2.Alternatively, you can use the--publishor-poption to map the container's ports to the host's ports3.

Total 183 questions
Go to page: of 19