Docker Community Forums

Share and learn in the Docker community.

Node-red docker: expose ports being created by nodes


(Narioinc89) #1

OS Version/build: Windows OS - Docker version 17.09.0-ce, build afdb6d4
App version: Node-red docker:

Issue type: When deploying node-red docker container, i see that ports being opened by some nodes are not being exposed outside.

Steps to reproduce:
Install the node red container and start the container:
docker run -it -p 1880:1880 --name mynodered nodered/node-red-docker
In the above command i only expose the port 1880 to the docker bridge network port 1880.

Now try to install the Alexa local palette node. Though its nothing in particular to this node. The problem I am facing is, such nodes usually expose a service at a port, say, somewhere between 40000-50000.

I am noob when it comes to the way docker handles the network for connected containers, but with my research i understood that containers by default connect to the bridge network and can be changed to connect to the host network by specifying the --network=host config.

However, can someone help me understand how to expose the range of IP being opened up by nodes be exposed outside via the 127.0.0.1 IP.

Any pointer would be appreciated.

UPDATE: so basically what i am not able to understand is, the alexa local node is emitting a hue emulation at port xxxx during runtime. I wouldn’t be sure what that port is until i deploy the node-red workflow. SO, how do I correctly let docker expose such hue emulations ports externally so that alexa can discover these devices.

NOTE: APOLOGISE IF THIS POST IN IN THE WRONG CATEGORY, I WOULD REQUEST THE ADMINS TO LET ME KNOW IF THE CATEGORY IS WRONG SO THAT I CAN CHNAGE IT :slight_smile:


(Sam) #2

docker inspect on the image id will give you the defined expose info (and a lot more)

from one of my images

    "Config": {
        "Hostname": "706cb4504c90",
        "Domainname": "",
        "User": "",
        "AttachStdin": false,
        "AttachStdout": false,
        "AttachStderr": false,
        "ExposedPorts": {
            "80/tcp": {}
        },

(Raymondmm) #3

I am facing the same issue like you. Have you found a solution to this?