I am using Windows 10 with docker setup. I have the following test_browser.py script in ubuntu container which tries to launch web browser:
import webbrowser
result = webbrowser.open("http://localhost:7070")
print(result)
If I try to run the above script inside container, it fails to open the url and prints False since there is no browser inside container.
Hence, I somehow want the script inside container to launch the url in host (windows) browser instead!
Fortunately, I have found a way to achieve it using VSCode:
We can attach to the running docker container and run the python script in its terminal. It will launch my windows chrome browser. Notice True output as well!
Since it is possible, I am looking for a way to do it without involving VSCode. Maybe some docker commands which can make it happen?

