AKSnowman Posted October 11, 2019 Share Posted October 11, 2019 (edited) Hello, I apologize if this should be posted in the specific container support port. I'm pretty sure this is a general docker question though. I'm going to explain a little bit about what I'm trying to do, to give some context. I'm attempting to connect my Amazon Alexa Echo Dot to Node Red and to do that I need my node red docker to listen on port 80. Well, this requires that I run node red as root user and I really would like to avoid that. I'm able to change the port that my node on node red is listening to from 80 to 1885 (can be random). When my echo dot tries to connect to my node red server it is going to reach out on port 80 so I need some mechanism to forward that port from 80 at the host to 1885 in the container. Here is my docker run command run -d --name='nodered' --net='br0' --ip='192.168.50.12' --log-opt max-size='50m' --log-opt max-file='1' --privileged=true -e TZ="America/Anchorage" -e HOST_OS="Unraid" -e 'TCP_PORT_1880'='1880' -v '/mnt/user/docker/appdata/nodered':'/data':'rw' --publish 80:1885 'nodered/node-red-docker:v8' To do this, I assumed docker port forwarding would be my solution. On my Container configuration page I've add the following to extra parameters -p 80:1885 and restart the docker container. When the docker page refreshes this is what is now showing in my port mappings (port 1880 is the port for the node red ui). 192.168.50.12:1880/TCP <-> 192.168.50.12:1880 192.168.50.12:1885/TCP <-> 192.168.50.12:1885 This stand out to me right away as being incorrect, shouldn't it show 1885/TCP <-> 80/TCP? When I navigate to 192.168.50.12:1885/description.xml I'm served with the contents that I'm expecting to be served at 192.168.50.12:80. When I run the command docker port nodered I don't see any results...should I expect to see my port mapping here? (again, I'm a novice and don't even know where to begin with this). When I run the command docker inspect nodered there is a block under HostConfig that shows the following (which seems correct to me?) "PortBindings": { "1885/tcp": [ { "HostIp": "", "HostPort": "80" } ] }, I'm not sure if this is an unraid issue or a docker issue or a docker container issue so I'm being jerked around all over the place trying to solve this on my own, I'm not sure where I should focus my attentions. Any help would be greatly appreciated. Thank you Edited October 11, 2019 by AKSnowman Added docker run command. Quote Link to comment
trurl Posted October 11, 2019 Share Posted October 11, 2019 Post your docker run command as explained in the very first link in the Docker FAQ pinned near the top of this same subforum. Quote Link to comment
AKSnowman Posted October 11, 2019 Author Share Posted October 11, 2019 I'm so sorry. For some reason when I looked at the FAQ for this exact thing (posting rules) I somehow skipping the first link. Quote Link to comment
flippedcracker Posted January 24, 2020 Share Posted January 24, 2020 @AKSnowman Have you been able to figure this out? Quote Link to comment
DuzAwe Posted April 15, 2020 Share Posted April 15, 2020 Sorry to wake an old thread, But was there ever any headway made on this. I'm facing the same issue. Quote Link to comment
Squid Posted April 15, 2020 Share Posted April 15, 2020 Port mapping works (and always has). The OP's problem is that he's running on a custom IP address so port mapping is irrelevant and doesn't make sense in the first place. Quote Link to comment
DuzAwe Posted April 15, 2020 Share Posted April 15, 2020 Hey Squid, So does that mean that if your using br0 you cant change port mappings on the host side? Say for example using something like cloudflared for DNS over HTTPs and need to use port 53 instead of 5053, that its impossible. Quote Link to comment
Squid Posted April 15, 2020 Share Posted April 15, 2020 You need to create a custom docker network bridge via the command line, which I cannot help you with to be able to map ports if you're using separate IP addresses. Quote Link to comment
DuzAwe Posted April 15, 2020 Share Posted April 15, 2020 👍 Thanks that is plenty to go off Quote Link to comment
bdydrp Posted June 11, 2020 Share Posted June 11, 2020 I'm going to revive this thread as there is a similar amazon node that i would like to install. BUT, in order to do so, it requires node-red to be running on the host network, for alexa to be listening on Port 80 Since i have my dockers on br0 with individual assigned IP's, is there anyway to have br0 listen to port 80 on the host network? This is my run cmd Thanks Quote Link to comment
franknew Posted February 6, 2021 Share Posted February 6, 2021 i would like to know the answer to this too On 6/11/2020 at 9:41 AM, bdydrp said: I'm going to revive this thread as there is a similar amazon node that i would like to install. BUT, in order to do so, it requires node-red to be running on the host network, for alexa to be listening on Port 80 Since i have my dockers on br0 with individual assigned IP's, is there anyway to have br0 listen to port 80 on the host network? This is my run cmd Thanks Quote Link to comment
tigga69 Posted May 26, 2022 Share Posted May 26, 2022 did anyone solve this.... Basically Im moving from smarththings to home assistant. There is only one thing left for me to do with Home Assistant before I throw away smartthings! That's issue a voice command to instruct HA to do something. I dont want to pay the monthly subscription to use allow HA to work with amazon, I want to keep things local rather than via the cloud. There are several palettes in node-red, but they require you to listen on port 80, and I cant work out how to listen on port 80. Can someone give an indication on how this would work on node-red. Thanks 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.