Publishing Ports in Docker
Ports are published while creating image using Dockerfile
publishing instructions are added as EXPOSE with port number
Like
or
or
:::info If we publish any port irrespective of if it is actually listening by any service or not these instructions will be printed in ports publishing instructions :::
:::note We do not have any options available by docker or Padman to identify actually which ports are used by any services.
Only way to identify is, attach the terminal of the container and run the commands to list open ports :::