Hilscher Community Forum
netpi-desktop-hdmi with setting network=bridge - Printable Version

+- Hilscher Community Forum (https://forum.hilscher.com)
+-- Forum: netPI 3 - Docker featuring Industrial Raspberry Pi 3 platform (https://forum.hilscher.com/forum-1.html)
+--- Forum: Software (https://forum.hilscher.com/forum-5.html)
+--- Thread: netpi-desktop-hdmi with setting network=bridge (/thread-606.html)

Pages: 1 2


netpi-desktop-hdmi with setting network=bridge - tad - June-10th-2020

Dear Armin,

I have created an application that displays an html screen using Node-RED.
This application works fine, but an external computer is required to view the html screen.
I just need a monitor instead of the computer.

Therefore, I deployed a new container (https://hub.docker.com/r/hilschernetpi/netpi-desktop-hdmi) on the same netPI.
At this time, I set Network=bridge mode even though this site explains below:
>The container needs to run in host network mode.
I then can see the html screen from a web browser via a monitor directly connected to netPI.

VNCViewer and SSH terminal cannot access to the hdmi container, but it is fine for me. 
I don't need to access it from any external devices.
(I understand a Node-RED container is the host mode and this container is prohibited to be access from the port 22.)


Therefore, the hdmi container can be set to bridge mode?
(Is there any fetal problem?)

Thank you very much for your advice.
Best regards,


RE: netpi-desktop-hdmi with setting network=bridge - Armin@netPI - June-10th-2020

Hi there,

indeed the HDMI screen executed over hte CPU graphics controller works independent whether or not the container is operated in bridged or host mode.

But as you maybe know bridged mode does not map the used ports 22 and 5900 automatically to the Docker host (as it would be done in host mode) and hence can't be reached from "outside world". So right now you can't get access to the container via Putty terminal program.

So what you can try additionally when starting the HDMI container to add port mapping on port 22 and port 5900 too. Then at least you should get putty up and working. For VNC I don't know if it needs host mode but give it a try and see.

But if you have multiple container running at the same time of course mapped ports or host ports an be used only one time. So imagine you would deploy a Node-RED container (each using port 1880) two times on netPI ... this would never work ... only the first container started by Docker will win and get the port 1880.


Thx
Armin


RE: netpi-desktop-hdmi with setting network=bridge - tad - June-10th-2020

Dear Armin,

Thank you very much for your kind advice.
As you explained, I tried to map Port 22 & 5900 to the host and then both SSH terminal and VNC Viewer could access to netPI.
I appreciate it.

I don't see any problem so I keep the network mode bridge for the hdmi container.
And, I now aware that the combination of Node-RED and hdmi containers is so useful.

Best regards,


RE: netpi-desktop-hdmi with setting network=bridge - tad - June-19th-2020

Dear Armin,

Is it possible to execute websocket in Chromium running on hilschernetpi/netpi-desktop-hdmi?

A websocket application creating by Node-RED is working properly on Chrome and Firefox from my pc.
But, the application doesn't work on Chromium from hilschernetpi/netpi-desktop-hdmi.
So, I was wondering what I should additionally install.

Thank you very much for your help.
Best regards,


RE: netpi-desktop-hdmi with setting network=bridge - Armin@netPI - June-19th-2020

Sure it is. The chromium is 100% a standard web browser. But I think you are calling the wrong IP address within your web chromium browser‘s address field. What address do you enter?
And the next question is how did you configure your Node-RED? Bridged mode or host mode?


RE: netpi-desktop-hdmi with setting network=bridge - Armin@netPI - June-19th-2020

If you for example access in chromium browser „localhost“ while running the container in bridged mode then it is not the host IP address you are addressing but the local IP address of the container itself


RE: netpi-desktop-hdmi with setting network=bridge - tad - June-19th-2020

Dear Armin,

Thank you very much for your quick feedback.

I use 192.168.1.23 for both Chrome (my pc) and Chromium (container) as attached files.
The container for Node-RED has been configured as host as attached 'Containers.png'.
On the browser, boxes of '1' to '10' must have background colors and boxes of 'A' to 'D' must have some numbers if websocket is correctly working.

>The chromium is 100% a standard web browser.

I'd like to try a little more.
I may have some mistakes...

Best regards,


RE: netpi-desktop-hdmi with setting network=bridge - Armin@netPI - June-19th-2020

Puhhhh. This is difficult. So basically the chromium browser in container does have access to the web socket. First I thought in my previous post that it does not have access at all. But it has ... only color and values are missing, Right?


RE: netpi-desktop-hdmi with setting network=bridge - Armin@netPI - June-19th-2020

Also I am not familiar with all the details of chromium. I am just using it as a loadable application as any other ready application too. Maybe sites help like these to understand difference between chrome and chromium https://www.howtogeek.com/202825/what%E2%80%99s-the-difference-between-chromium-and-chrome/

For me it is a 100% working web browser


RE: netpi-desktop-hdmi with setting network=bridge - Armin@netPI - June-19th-2020

Maybe you should try to install another web browser additionally. Open a terminal in the desktop and install Firefox.

Here is a link how to do it: https://linuxconfig.org/how-to-install-latest-firefox-browser-on-debian-9-stretch-linux

After that a restart of the device is necessary. I can’t test it myself right now since I am working from home.