-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use of EXPOSE causes unnecessary ports being opened when changing ports #22
Comments
To assist in troubleshooting, could you please describe the steps required to replicate this issue? |
Using the following
|
What's your proposed solution? If this isn't a breaking change, please consider submitting a pull request (PR). Alternatively, could we specify a different unused port to avoid potential problems? I'm curious to understand the issue this behavior might create. I haven't personally encountered any problems, and you're the first to report it. This has me stumped! |
Simply removing the line mentioned in the original post should do the trick*. *Although it may be more intuitive to set the HTTP_PORT default to 8080 so All the instances I have found in your documentation already have specific port mappings called out in both the Feel free to try this and verify this behavior is as described. |
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
ordocker compose
). By using the EXPOSE command in the docker file, even if you map another port through thedocker
command line or in adocker compose
, you still get extra exposed ports which might collide with other containers running.Docker-Image/Dockerfile
Line 73 in fc86f9f
The text was updated successfully, but these errors were encountered: