Docker Certified Associate (DCA) — Question 12

Can this set of commands identify the published port(s) for a container?
‘docker container inspect’, ‘docker port’

Answer options

Correct answer: A

Explanation

The command ‘docker container inspect’ provides detailed information about the container, including its published ports. Additionally, ‘docker port’ specifically shows the port mappings, confirming that the answer is 'Yes'. The option 'No' is incorrect because both commands can indeed identify the published ports.