Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Docker Exam DCA Topic 6 Question 92 Discussion

Actual exam question for Docker's DCA exam
Question #: 92
Topic #: 6
[All DCA Questions]

Can this set of commands identify the published port(s) for a container?

Solution: `docker network inspect', `docker port'

Show Suggested Answer Hide Answer
Suggested Answer: A

Yes, the docker port command can be used to identify the published ports for a running container. It shows the mapping between the host ports and the container's exposed ports. The docker network inspect command can also provide information about the network settings of the container, including port mappings. However, it's important to note that docker network inspect requires the network's name or ID as an argument, not the container's. Therefore, to get the network details of a specific container, you would first need to identify the network the container is connected to. These commands, when used appropriately, can help you identify the published ports for a container.


Contribute your Thoughts:

Zona
10 months ago
Haha, I bet the person who wrote this question has been waiting to trick us with that `docker network inspect` option. Nice try, but I'm not falling for it!
upvoted 0 times
Chauncey
9 months ago
B) No
upvoted 0 times
...
Farrah
9 months ago
A) Yes
upvoted 0 times
...
...
Geoffrey
10 months ago
I'm not sure, but I'll go with option A) Yes based on Xenia and Tonette's rationale.
upvoted 0 times
...
Tonette
10 months ago
I agree with Xenia, those commands should be able to identify the published ports.
upvoted 0 times
...
Xenia
10 months ago
Yes, I think the commands 'docker network inspect' and 'docker port' can do that.
upvoted 0 times
...
Lucy
10 months ago
Can this set of commands identify the published port(s) for a container?
upvoted 0 times
...
Derrick
10 months ago
This is a classic case of 'read the question carefully'. The answer is right there in front of us - `docker port` is the way to go. No need to overthink it.
upvoted 0 times
...
Stephen
11 months ago
Wait, `docker network inspect`? I thought that was for checking the network configuration, not container ports. Good to know I was missing that one.
upvoted 0 times
Olen
9 months ago
I was surprised too, but `docker network inspect` is definitely useful for checking container ports.
upvoted 0 times
...
Geraldine
9 months ago
No, `docker network inspect` is not just for network configuration, it can also show container ports.
upvoted 0 times
...
Tayna
9 months ago
Yes, `docker network inspect` can help identify the published ports for a container.
upvoted 0 times
...
Han
10 months ago
I didn't know that either! Thanks for sharing, now I know how to check container ports.
upvoted 0 times
...
Kristel
10 months ago
No, `docker network inspect` is not just for checking network configuration, it can also show container ports.
upvoted 0 times
...
Simona
10 months ago
Yes, `docker network inspect` can also be used to identify the published ports for a container.
upvoted 0 times
...
...
Natalie
11 months ago
The `docker port` command is definitely the way to go here. I can't believe I didn't think of that sooner!
upvoted 0 times
Donette
10 months ago
B) No
upvoted 0 times
...
Sharan
10 months ago
The `docker port` command is definitely the way to go here. I can't believe I didn't think of that sooner!
upvoted 0 times
...
Nickie
10 months ago
A) Yes
upvoted 0 times
...
...

Save Cancel