XK0-005 · Question #1383
XK0-005 Question #1383: Real Exam Question with Answer & Explanation
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 b
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
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.