skip to Main Content

Relatively new to Docker. I am running a node-red dashboard that displays MQTT information such as temperature and humidity. I created a docker image of the node-red dash and can successfully connect to it through the host machine simply using the IPv4 address or localhost:1880.

My goal is to have a second machine connect to the container and view the node-red dash. I am on University WiFi, thus the IPv4 from the host I use is not static. Are there any ways to connect a second computer to the address to view the dashboard? Does this second machine need to install docker as well? Thanks!

2

Answers


  1. My first guess is that if you know your host’s MAC address, you could eventually retrieve the IP by exploring machines on your current network with a command such as arp -a

    Then, from here you might be able to access to your server running on the first machine.

    However, beware of something. You need to make sure on which host it is bound on the first machine: localhost, and 0.0.0.0 are not exactly the same.

    You can read more here: What is the difference between 0.0.0.0, 127.0.0.1 and localhost?

    Login or Signup to reply.
  2. You can try docker run -p 0.0.0.0:1880:1880 according to your configuration. With this you can connect to your container from outside. Hope it helps!

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search