Question No 1:

Which of the following commands wifi automatically create a volume when a container is started?

A. ‘docker container run –name nginxtest –volumes=/app nginx’
B. ‘docker container run –name nginxtest -v /app:mount nginx’
C. ‘docker container run –name nginxtest –volumes myvol:/app:new nginx’
D. ‘docker container run –name nginxtest -v myvol:/app nginx’

Answer: A

Question No 2:

Which of the following are types of namespaces used by Docker to provide isolation? (Choose 2.)

A. Host
B. Network
C. Process ID
D. Authentication
E. Storage

Answer: B, C

Question No 3:

Following the principle of least privilege, which of the following methods can be used to securely grnt access to the specific user to communicate to a Docker engine? (Choose two.)

A. Utilize the ‘–host 0.0.0.0:2375’ option to the Docker daemon to listen on port 2375 over TCP on all interfaces
B. Utilize openssl to create TLS client and server certificates, configuring the Docker engine to use with mutual TLS over TCP.
C. Utilize the ‘–host 127.0.0.1:2375’ option to the Docker daemon to listen on port 2375 over TCP on localhost
D. Give the user root access to the server to allow them to run Docker commands as root.
E. Add the user to the ‘docker’ group on the server or specify the grouè with the ‘–group’ Docker daemon option.

Answer: B, E

Question No 4:

Which one of the following commands will result in the volume being removed automatically once the container has exited?

A. ‘docker run –del -v /foo busybox’
B. ‘docker run –read-only -v /foo busybox’
C. ‘docker run –rm -v /foo busybox’
D. ‘docker run –remove -v /foo busybox’

Answer: C

Question No 5:

A container named “analytics” that stores results in a volume called “data” was created. docker run -d –name=analytics -v data:/data app1 How are the results accessed in “data” with another container called “app2”?

A. docker run -d –name=reports –volume=data app2
B. docker run -d –name=reports –volumes-from=analytics app2
C. docker run -d –name=reports –volume=app1 app2
D. docker run -d –name=reports –mount=app1 app2

Answer: B

Leave a Reply

Your email address will not be published. Required fields are marked *