First need to install chocolatey.
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
choco install vcxsrv
VcXServ can get started by UI or with the following command
cd %ProgramFiles%
cd VcXsrv
vcxsrv -multiwindow -ac
docker create --name=chrome --net=host -e TZ=<timezone> -v <Path/to/Downloads>:/root/Downloads -e DISPLAY=<ip>:0.0 pkos/chrome
- <timezone> : Your timezone, this is optional
- <PathToDownloads>: Path to your downloads folder
- <ip>: in order to show chrome in your docker host screen you need your DockerNAT ip, can get using ifconfig/ipconfig (depending Mac or Windows)
if you don't know it run ipconfig
find the Ethernet adapter vEthernet (DockerNAT)
and grab the IP
Or you can run:
netsh interface ip show config name="vEthernet (DockerNAT)" | findstr "IP Address"
and you will receive the IP information as following:
IP Address: 10.0.75.1
docker start chrome
docker stop chrome
In the case you have the scripts for install and run.
.\install.ps1 -timezone "America/La_Paz" -downloadsFolder "[path\to\downloads]"
Where -timezone
is optional, it should be your timezone e.g. Europe/London
And -downloadsFolder
is your downloads folder
Add the permissions (only the first time)
chmod a+x install.sh
Then run
./install.sh
Run in powershell the script start.ps1
with the following parameter
.\start.ps1
You can create a shortcut and on the target field add the following:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe "[Path\To\start.ps1]"
Add the permissions (only the first time)
chmod a+x start.sh
Then run
./start.sh
First you have to install xquartz, try installing from brew
brew install xquartz
if you can't find the package try with
cd ~/Downloads
wget https://dl.bintray.com/xquartz/downloads/XQuartz-2.7.11.dmg
hdiutil attach XQuartz-2.7.11.dmg
cd /Volumes/XQuartz-2.7.11/
sudo installer -pkg XQuartz.pkg -target /
socat TCP-LISTEN:6000,reuseaddr,fork UNIX-CLIENT:\"$DISPLAY\" &
Find your ip using ifconfig
or you can run the command below to grab it and save into $ip
variable
ip="$(ifconfig | grep inet | grep -v inet6 | grep -v 127.0.0.1 | grep -oE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b" | grep -v 255)"
docker create --rm --name=chrome -e DISPLAY="$ip:0.0" -v <PathToDownloads>:/root/Downloads pkos/x-chrome
- Where
$ip
is your IP got from previous command. - TZ= it is your time zone (e.g. America/La_Paz) this is optional
- <PathToDownloads> is your path for downloads, e.g. ~/Downloads
run xquartz
open -a Xquartz
It will start a white console, if you are running for the first time please check Allow connections from network clients going to Preferences > Security
docker start chrome
docker stop chrome