Hello,
I'm having some issues with using the default ports that are exposed. Once these ports are exposed, there is no way to unexpose them or change them. It is much preferable for a project to choose an arbitrary port (like the standard 80 and 443) for inside the container that users can then map to any port they want outside the container (using the standard docker run -p 80:1234 or docker compose). By using the EXPOSE command in the docker file, even if you map another port through the docker command line or in a docker compose, you still get extra exposed ports which might collide with other containers running.
|
EXPOSE ${HTTP_PORT} ${HTTPS_PORT} |