You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Using WebView in Docker when port is not exposed #192
I just updated to the latest version of code-server for a docker container that I maintain. The latest version of vscode-R works great ... except that I can't open help files in HTML view. The reason is that webview starts on an (random) port which is not exposed by the docker container. There is some documentation about this but I'm not clear what steps would be needed.
@renkun-ken Wondering if you might have any suggestions on how to deal with something like this. Is it feasible to add an option (e.g., through .Rprofile) for the port to use perhaps?
@vnijs The problem is not with random ports. Webview opens a website that refers to localhost (127.0.0.1), which - from the browser's point of view - doesn't point to the code server (host) but your client on which the browser is running.
"Allow forwarding ports via URL" is discussed at coder/code-server#1309 - a long overdue request by the [code-server] community.
To access HTML [help] files, Shiny apps and alike on code-server, some kind of port forwarding proxy and URL rewrite for Webview is needed.
Activity
renkun-ken commentedon Jan 18, 2020
The following option solves the problem:
If you need multiple ports to tried sequentially, supply a vector of port numbers, and it will try one by one until one is found avaiable.
See:
benz0li commentedon Feb 19, 2020
@vnijs The problem is not with random ports. Webview opens a website that refers to localhost (127.0.0.1), which - from the browser's point of view - doesn't point to the code server (host) but your client on which the browser is running.
"Allow forwarding ports via URL" is discussed at coder/code-server#1309 - a long overdue request by the [code-server] community.
To access HTML [help] files, Shiny apps and alike on code-server, some kind of port forwarding proxy and URL rewrite for Webview is needed.
renkun-ken commentedon Oct 25, 2021
Closed via #803.