exam questions

Exam 350-901 All Questions

View all questions & answers for the 350-901 exam

Exam 350-901 topic 1 question 149 discussion

Actual exam question from Cisco's 350-901
Question #: 149
Topic #: 1
[All 350-901 Questions]


Refer to the exhibit. The command docker build --tag=friendlyhello . is run to build a docker image from the given Dockerfile, reguirements.txt, and app.py. Then the command docker run -p 4000:80 friendlyhello is executed to run the application.
Which URL is entered in the web browser to see the content served by the application?

  • A. http://127.0.0.1:80
  • B. http://4000:80
  • C. http://localhost:4000
  • D. http://localhost:80
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
lente_kriebels
Highly Voted 1 year, 8 months ago
Correct answer is C
upvoted 18 times
...
m0nking
Highly Voted 1 year, 5 months ago
Selected Answer: C
using -p at runtime publishs a container’s specific port to the Docker host docker run -p <hostPort>:<containerPort> imageName
upvoted 8 times
...
examtopicstroilevw
Most Recent 1 month, 2 weeks ago
Selected Answer: C
This is a question about 'docker run -p" Publish or expose port (-p, --expose) docker run -p 127.0.0.1:80:8080/tcp nginx:alpine This binds port 8080 of the container to TCP port 80 on 127.0.0.1 of the host. You can also specify udp and sctp ports. The Networking overview page explains in detail how to publish ports with Docker. Note If you don't specify an IP address (i.e., -p 80:80 instead of -p 127.0.0.1:80:80) when publishing a container's ports, Docker publishes the port on all interfaces (address 0.0.0.0) by default.
upvoted 1 times
examtopicstroilevw
1 month, 2 weeks ago
reference: https://docs.docker.com/reference/cli/docker/container/run/#publish
upvoted 1 times
...
...
Teringzooi
7 months, 1 week ago
Selected Answer: C
Correct answer: C docker run -p <hostPort>:<containerPort> imageName
upvoted 2 times
...
garcesdavid88
1 year, 7 months ago
http://localhost:4000
upvoted 5 times
...
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.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago