¡Esta es una revisión vieja del documento!
Tests
Contenido perteneciente al curso Docker avanzado.
Preguntas de certificación
Which of the following commands will 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(Correcta)
Which one of the following commands will show a list of volumes for a specific container?
- A.
docker container logs nginx –volumes - B.
docker container inspect nginx - C.
docker volume inspect nginx(Correcta) - D.
docker volume logs nginx –containers
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(Correcta) - D.
docker run –remove -v /foo busybox
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(Correcta) - C.
docker run -d –name=reports –volume=app1 app2 - D.
docker run -d –name=reports –mount=app1 app2
A server is running low on disk space. What command can be used to check the disk usage of images, containers, and volumes for Docker engine?
- A.
docker system df(Correcta) - B.
docker system prune - C.
docker system free - D.
docker system ps
Which of the following are types of namespaces used by Docker to provide isolation? (Choose 2.)
- A. Host
- B. Network (Correcta)
- C. Process ID (Correcta)
- D. Authentication
- E. Storage
What is the difference between a resource limit and a resource reservation when scheduling services?
- A. A resource limit and a resource reservation can be used interchangeably.
- B. A resource limit is a soft limit for your service, while a reservation is hard limit and the docker engine will do its best to keep your service at the limit. (Correcta)
- C. A resource limit is used to find a host with adequate resources for scheduling a hard limit for your service, while a reservation is hard limit for your service.
- D. A resource limit is hard limit for your service, while a reservation is used to find a host with
adequate resources for scheduling.
Which of the following namespaces is disabled by default and must be enabled at Docker engine runtime in order to be used?
- A. user (Correcta)
- B. pid
- C. net
- D. mnt
Which of the following statements is true about secrets?
- A. Secrets can be created from any node in the cluster.
- B. Secrets can be modified after they are created.
- C. Secret are stored unencrypted on manager nodes.
- D. Secrets can be created using standard input (STDIN) and a file. (Correcta)
Following the principle of least privilege, which of the following methods can be used to securely grant access to the specific user to communicate to a Docker engine? (Choose two.)
- A. Utilize the
--host 0.0.0.0:2375option 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:2375option 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. (Correcta)
