A developer needs to launch an Nginx image container, name it Web00l, and expose port 8080 externally while mapping to port 80 inside the container. Which of the following commands will accomplish this task?
exec is used to run a command in a running container
load is used to load an image from a tar archive
run is used to start a new container
pull is used to load an image from repository
to launch something is to start something, C make sense.
To start a container and map ports in Docker, you can use the docker run command with the -p or --publish flag:
Syntax -p host_port:container_port
Example: To map port 8080 on the host to port 80 inside the container, you can use -p 8080:80
Multiple port mappings: You can specify multiple port mappings by repeating the -p flag
A developer needs to launch an Nginx image container, name it Web00l, and expose 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
B. docker load -it -p 8080:80 --name Web001 nginx
C. docker run -it -p 8080:80 --name Web001 nginx
D. docker pull -it -p 8080:80 --name Web001 nginx
upvoted 1 times
...
This section is not available anymore. Please use the main Exam Page.XK0-005 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
NastyNutsu
2 months agoaf67070
3 months, 2 weeks agoericsrz
10 months ago