XK0-005 · Question #388
A cloud engineer needs to launch a container named web-01 in background mode. Which of the following commands will accomplish this task''
The correct answer is D. docker run -d --name web-01 httpd. The docker run -d --name web-01 httpd command will launch a container named web-01 in background mode. This command will create and start a new container from the httpd image, assign it the name web-01, and run it in detached mode (-d), which means the container will run in the…
Question
A cloud engineer needs to launch a container named web-01 in background mode. Which of the following commands will accomplish this task''
Options
- Adocker builder -f --name web-01 httpd
- Bdocker load --name web-01 httpd
- Cdocker ps -a --name web-01 httpd
- Ddocker run -d --name web-01 httpd
How the community answered
(23 responses)- A4% (1)
- C9% (2)
- D87% (20)
Explanation
The docker run -d --name web-01 httpd command will launch a container named web-01 in background mode. This command will create and start a new container from the httpd image, assign it the name web-01, and run it in detached mode (-d), which means the container will run in the background without attaching to the current terminal. The docker builder -f --name web-01 httpd command is invalid, as builder is not a valid docker command, and -f and --name are not valid options for docker build. The docker load --name web-01 httpd command is invalid, as load does not accept a --name option, and httpd is not a valid file name for load. The docker ps -a -- name web-01 httpd command is invalid, as ps does not accept a --name option, and httpd is not a valid filter for ps.
Topics
Community Discussion
No community discussion yet for this question.