Short/small installation guide to run docker images on Windows 10.
First follow the instructions at https://docs.docker.com/docker-for-windows/install/
You have to register with Docker (obtain a Docker ID) in order to see the actual download link.
Before continuing, make sure that docker is running and you can run docker commands!
Check this by running in the command line or PowerShell:
docker run hello-world
X-Server on Windows 10
In order to interact graphically with a running docker container, a display server ("X server") must be running on the local PC.
Additionally the server must allow local connections, since this is the way a display can communicate from inside a running Docker container with the outside world, in this case the local Windows system.
To connect to a server running on your machine, first obtain the host name from the PowerShell by running:
At DESY, the Software X-Win32 is available; please install it from the DSM. Please note that it requires a connection to the license server in order to run.
Now open the program X-Win32, where a configuration should be visible. Follow the instructions as mentioned at https://www.starnet.com/xwin32kb/window-manager/
- in security settings either add the hostname or simply allow connections from all hosts (and click 'save' at the end)
- create a 'new connection' → Manual
- select 'command line' (first select 'More' to see this choice)
- give it a name
- select 'fluxbox.exe' as target, located in the installation directory of X-Win32 (e.g.C:\Program Files\StarNet\X-Win32 2018)
- press 'save'
- restart X-Win32 in 'single window mode'
Another option is to use MobaXterm, available from https://mobaxterm.mobatek.net/
A free "Home Edition" can be downloaded from the server, which doesn't need a permanent network connection.
After installation, to run the X server:
- start MobaXterm
- start X server
- start local terminal
- type 'hostname' to get the name of the machine
- allow connection from any IP by typing 'xhost +'
Test docker with X-Server
There is a container to test whether the Docker connection with the X server on Windows 10 is working (replace $HOSTNAME with the host name determined previously by e.g. the PowerShell command):
docker run -it --rm -e DISPLAY=$HOSTNAME:Number jess/firefox
This starts a docker container called "jess/firefox" (a firefox installation running on a special Debian image).
It runs interactively in a terminal and removes everything after closing. Since the display needs to be connected to a display server, the environment variable has to be set accordingly.