ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 233 - XK0-005 discussion

Report
Export

A developer needs to launch an Nginx image container, name it Web001, and ex-pose port 8080 externally while mapping to port 80 inside the container. Which of the following commands will accomplish this task?

A.
docker exec ---it -p 8080: 80 ------name Web001 nginx
Answers
A.
docker exec ---it -p 8080: 80 ------name Web001 nginx
B.
docker load -it -p 8080:80 ------name Web001 nginx
Answers
B.
docker load -it -p 8080:80 ------name Web001 nginx
C.
docker run -it -P 8080:80 ------name Web001 nginx
Answers
C.
docker run -it -P 8080:80 ------name Web001 nginx
D.
docker pull -it -p 8080:80 ---name Web00l nginx
Answers
D.
docker pull -it -p 8080:80 ---name Web00l nginx
Suggested answer: C

Explanation:

To launch an Nginx image container, name it Web001, and expose port 8080 externally while mapping to port 80 inside the container, the administrator can use the commanddocker run -it -p 8080:80 --name Web001 nginx. This will create and start a new container from the Nginx image, assign it a name of Web001, and map port 8080 on the host to port 80 on the container. The other commands are not valid or do not meet the requirements.Reference:

[CompTIA Linux+ Study Guide], Chapter 11: Working with Containers, Section: Running Containers with Docker

[How to Run Docker Containers]

asked 02/10/2024
GLAUCIA C N SILVA
41 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first