Cyber Monday 2024! 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
4 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
3 months ago
B) No
upvoted 0 times
...
Farrah
4 months ago
A) Yes
upvoted 0 times
...
...
Geoffrey
4 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
4 months ago
I agree with Xenia, those commands should be able to identify the published ports.
upvoted 0 times
...
Xenia
4 months ago
Yes, I think the commands 'docker network inspect' and 'docker port' can do that.
upvoted 0 times
...
Lucy
4 months ago
Can this set of commands identify the published port(s) for a container?
upvoted 0 times
...
Derrick
5 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
5 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
3 months ago
I was surprised too, but `docker network inspect` is definitely useful for checking container ports.
upvoted 0 times
...
Geraldine
3 months ago
No, `docker network inspect` is not just for network configuration, it can also show container ports.
upvoted 0 times
...
Tayna
3 months ago
Yes, `docker network inspect` can help identify the published ports for a container.
upvoted 0 times
...
Han
4 months ago
I didn't know that either! Thanks for sharing, now I know how to check container ports.
upvoted 0 times
...
Kristel
4 months ago
No, `docker network inspect` is not just for checking network configuration, it can also show container ports.
upvoted 0 times
...
Simona
4 months ago
Yes, `docker network inspect` can also be used to identify the published ports for a container.
upvoted 0 times
...
...
Natalie
5 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
4 months ago
B) No
upvoted 0 times
...
Sharan
4 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
4 months ago
A) Yes
upvoted 0 times
...
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77