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
13 days 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
Farrah
2 days ago
A) Yes
upvoted 0 times
...
...
Geoffrey
20 days ago
I'm not sure, but I'll go with option A) Yes based on Xenia and Tonette's rationale.
upvoted 0 times
...
Tonette
21 days ago
I agree with Xenia, those commands should be able to identify the published ports.
upvoted 0 times
...
Xenia
22 days ago
Yes, I think the commands 'docker network inspect' and 'docker port' can do that.
upvoted 0 times
...
Lucy
26 days ago
Can this set of commands identify the published port(s) for a container?
upvoted 0 times
...
Derrick
1 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
1 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
Han
4 days ago
I didn't know that either! Thanks for sharing, now I know how to check container ports.
upvoted 0 times
...
Kristel
10 days ago
No, `docker network inspect` is not just for checking network configuration, it can also show container ports.
upvoted 0 times
...
Simona
20 days ago
Yes, `docker network inspect` can also be used to identify the published ports for a container.
upvoted 0 times
...
...
Natalie
2 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 days ago
User 3: B) No
upvoted 0 times
...
Sharan
11 days 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
15 days ago
User 1: A) Yes
upvoted 0 times
...
...

Save Cancel