jonners99 Posted October 6, 2019 Share Posted October 6, 2019 I have created a docker container with a nodejs application inside it. The application listens on port 3000. In the unraid docker settings I am using br0 as my Network Type to give the container its own IP address. I then want to forward traffic from port 80 to 3000, however, I cannot work out how to do this. If I select bridge mode instead of br0 then the port configuration allows me to set port 80 to forward, however, in br0 mode the container port field is missing. I also tried adding "-p 80:3000" as an extra parameter in the advanced fields. However, this had no effect. Is this possible? Quote Link to comment
JonathanM Posted October 6, 2019 Share Posted October 6, 2019 3 minutes ago, jonners99 said: Is this possible? No. If the container has its own IP, then all ports are open and available. You need to change the listening port in the app itself to 80, which may not be possible if it's running non privileged. Quote Link to comment
Squid Posted October 6, 2019 Share Posted October 6, 2019 4 minutes ago, jonners99 said: give the container its own IP address All port mappings are ignored when a container runs on its own dedicated IP. You will always use in your case 3000 Quote Link to comment
Squid Posted October 6, 2019 Share Posted October 6, 2019 1 minute ago, jonathanm said: No. If the container has its own IP, then all ports are open and available. You need to change the listening port in the app itself to 80, which may not be possible if it's running non privileged. Jinx Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.