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 Docker Certified Associate Exam exam
Question #: 92
Topic #: 6
[All Docker Certified Associate Exam 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
2 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
1 months ago
B) No
upvoted 0 times
...
Farrah
1 months ago
A) Yes
upvoted 0 times
...
...
Geoffrey
2 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
2 months ago
I agree with Xenia, those commands should be able to identify the published ports.
upvoted 0 times
...
Xenia
2 months ago
Yes, I think the commands 'docker network inspect' and 'docker port' can do that.
upvoted 0 times
...
Lucy
2 months ago
Can this set of commands identify the published port(s) for a container?
upvoted 0 times
...
Derrick
2 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
2 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
15 days ago
I was surprised too, but `docker network inspect` is definitely useful for checking container ports.
upvoted 0 times
...
Geraldine
17 days ago
No, `docker network inspect` is not just for network configuration, it can also show container ports.
upvoted 0 times
...
Tayna
19 days ago
Yes, `docker network inspect` can help identify the published ports for a container.
upvoted 0 times
...
Han
1 months ago
I didn't know that either! Thanks for sharing, now I know how to check container ports.
upvoted 0 times
...
Kristel
1 months ago
No, `docker network inspect` is not just for checking network configuration, it can also show container ports.
upvoted 0 times
...
Simona
2 months ago
Yes, `docker network inspect` can also be used to identify the published ports for a container.
upvoted 0 times
...
...
Natalie
3 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
1 months ago
User 3: B) No
upvoted 0 times
...
Sharan
2 months ago
User 2: 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
2 months ago
User 1: A) Yes
upvoted 0 times
...
...

Save Cancel