Go to your wifi information and get your system. For example, your HOST IP is 192.168.1.1 using ifconfig or ipconfig
and user name by whoami
then inside container you can do like
ssh [email protected] 'DISPLAY=:0 firefox http://192.168.1.1:8080'
for linux based.
I f host is window then you can run
ssh [email protected] 'DISPLAY=:0 start http://192.168.1.1:8080'
if you want to avoid username and password just public-private key and place your public key in container and ssh using that key.
or docker exec -it container_name ash|bash -c ssh [email protected] 'DISPLAY=:0 firefox http://192.168.1.1:8080'
You can run different command base on os
if [[ "$OSTYPE" == "linux-gnu" ]]; then
# ...
elif [[ "$OSTYPE" == "darwin"* ]]; then
# Mac OSX
elif [[ "$OSTYPE" == "cygwin" ]]; then
# POSIX compatibility layer and Linux environment emulation for Windows
elif [[ "$OSTYPE" == "msys" ]]; then
# Lightweight shell and GNU utilities compiled for Windows (part of MinGW)
elif [[ "$OSTYPE" == "win32" ]]; then
# I'm not sure this can happen.
elif [[ "$OSTYPE" == "freebsd"* ]]; then
# ...
else
# Unknown.
fi
https://support.rackspace.com/how-to/logging-in-with-an-ssh-private-key-on-linuxmac/
How to detect the OS from a Bash script?