Docker Certified Associate (DCA) — Question 21

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

Answer options

Correct answer: B

Explanation

The correct answer is B because 'docker port inspect' is not a valid command; the correct command to view published ports is 'docker port'. 'docker container inspect' provides detailed information about a container but does not directly show published ports without further querying.