jlesage / docker-baseimage-gui

A minimal docker baseimage to ease creation of X graphical application containers
MIT License
1.2k stars 179 forks source link

Feasibility of a browser connection to a remotely hosted docker-firefox container #78

Closed pcbuildpluscoding closed 2 years ago

pcbuildpluscoding commented 2 years ago

Hi, Thanks for your docker-firefox image. I want to use docker-firefox to publish custom web-extensions to the internet. I've setup a wireguard VPN that successfully tunnels connections between my VPNProxy cloud server and my local LAN To test the publishing capability I first run docker-firefox in my local ubuntu desktop, using nerdctl which a docker clone but its runs in a rootless namespace. http://localhost:5800 displays the expected VNC output. If I ssh into my VPNProxy server and run curl http://192.168.2.3:5800, I get the expected VNC output =>

\

\<!DOCTYPE html> \ \ \<!-- This UI for noVNC is optimized to access the Graphical User Interface (GUI) of a single running application. This is perfect for applications running inside a Docker container.

Connect parameters are determined automatically.  However, they can, like
all supported parameters, be overwritten with a query string:
    http://example.com/?host=HOST&port=PORT&encrypt=1&true_color=1

-->

\Firefox

But when I attach my frontend webapp and create a test link pointing to the same address, the header is loaded but the page times out trying to load the actual firefox output content. Any ideas?

jlesage commented 2 years ago

Sorry, you lost me at:

when I attach my frontend webapp and create a test link pointing to the same address

Not sure what you mean by "frontend webapp" and "test link".

the header is loaded but the page times out trying to load the actual firefox output content

This looks like the WebSocket connection is not able to be performed.

pcbuildpluscoding commented 2 years ago

Works now ! Conveniently, my VPN proxy was already setup with a websocket behind a nginx reverse proxy for content delivery I removed these lines from my nginx config ... I forgot that your nginx setup is similar proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; Putting them back solved my issue Cheers