exam questions

Exam 200-901 All Questions

View all questions & answers for the 200-901 exam

Exam 200-901 topic 1 question 182 discussion

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

A developer created a new secure API and is testing the functionality locally. The API was added to a container for further testing, and other team members and applications need to connect to the API. Which command exposes the API in the container as port 8443 and allows connections external to the host?

  • A. docker run -p 127.0.0.1:80:8443/tcp myapiservice
  • B. docker run -p 0.0.0.0:443:8443/tcp myapiservice
  • C. docker run -p 0.0.0.0:8443:443/tcp myapiservice
  • D. docker run -p 127.0.0.1:443:8443/tcp myapiservice
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

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
Toxkalcan
Highly Voted 2 years, 11 months ago
Selected Answer: B
must be B https://docs.docker.com/config/containers/container-networking/ -p 8080:80 Map TCP port 80 in the container to port 8080 on the Docker host.
upvoted 11 times
...
shtou
Highly Voted 2 years, 11 months ago
Selected Answer: C
you are allowing others to connect thus is the host port imo.
upvoted 7 times
...
dexcript
Most Recent 10 months ago
Expose a port to external clients, question mentioned 8443, we already know that by default API's listen to 443, should be C.
upvoted 1 times
...
kymoni
1 year, 1 month ago
Selected Answer: C
C is correct. Wording in the question implies that 8443 should be exposed towards other developers, hence 8443:443
upvoted 2 times
...
Muste
1 year, 2 months ago
Selected Answer: C
the answer is C
upvoted 2 times
...
herrmann69
1 year, 3 months ago
Selected Answer: C
Which command exposes the API in the container as port 8443 and allows connections external to the host? As others said - terribly worded question. Since the question is asking for the command to expose the API "as" port 8443, I would interpret it that the internal port of the API (443) is being mapped to 8443 on the host. Answers A and B are wrong, since they are limited to localhost, thus no external connections.
upvoted 1 times
...
miq
2 years ago
Selected Answer: B
B is correct, public:docker port
upvoted 2 times
...
nunyabeez
2 years, 3 months ago
Yet another terribly worded question. When it says "which command exposes the API in the container as port 8443," it sounds like it's asking which port the container is using. But the word "as" implies it's asking what is representing the container's internal port as 8443 to the rest of the world. If that's the case, then B would be correct. It's really unfortunate that Cisco employs these methods in their testing. Either they're sloppy, or they're intentionally testing us on the subtleties of the semantics of the English language which don't mean anything when it comes to actually doing DevNet.
upvoted 4 times
nunyabeez
2 years, 3 months ago
Sorry I meant C would be correct, since the host port comes before the colon and the container port comes after.
upvoted 1 times
...
...
r3mo
2 years, 3 months ago
It's B
upvoted 1 times
...
chris_edwards
2 years, 4 months ago
Selected Answer: B
To expose the API in a container on port 8443 and allow external connections to the host on port 443, you can use the -p flag with docker run to publish a specific port from the container to the host. This will expose the API running in the container on port 8443, and allow external connections to the host on port 443. The port number on the left side of the colon (443) is the port on the host, and the port number on the right side (8443) is the port inside the container.
upvoted 1 times
...
VictorBravo
2 years, 4 months ago
Selected Answer: C
C is correct
upvoted 1 times
...
chris_edwards
2 years, 5 months ago
Selected Answer: C
The docker port expose is 8443
upvoted 1 times
...
nospampls
2 years, 5 months ago
Selected Answer: C
it is C
upvoted 1 times
...
Mick47
2 years, 6 months ago
The syntax for -p is HOST_PORT:CLIENT_PORT In this case the HOST_PORT is gonna be 8443 so it can be expose for external usage
upvoted 2 times
...
aplicacion101
2 years, 8 months ago
Selected Answer: C
Correct is C https://docs.docker.com/desktop/networking/
upvoted 1 times
...
XerAR
2 years, 10 months ago
Selected Answer: C
C imho
upvoted 1 times
...
macxsz
2 years, 11 months ago
Selected Answer: B
I think it should be B If you want docker to use port 8443 to connect, it needs to be 443:8443 The first is internal, the second external
upvoted 4 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 ...