To declare exposed ports from a Dockerfile use the EXPOSE
instruction:
EXPOSE 8080 8082
Exposed ports setting can be overridden from the Docker commandline but it is a good practice to explicitly set them in the Dockerfile as it helps understand what an application does.