Page tree

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

Installation:

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:

hostname.exe

X-Win32

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.

Configuration:

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/

  1. in security settings either add the hostname or simply allow connections from all hosts (and click 'save' at the end)
  2. create a 'new connection' → Manual
  3. select 'command line' (first select 'More' to see this choice)
  4. give it a name
  5. select 'fluxbox.exe' as target, located in the installation directory of X-Win32 (e.g.C:\Program Files\StarNet\X-Win32 2018)
  6. press 'save'
  7. restart X-Win32 in 'single window mode'

MobaXTerm

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.

Configuration:

After installation, to run the X server:

  1. start MobaXterm
  2. start X server
  3. start local terminal
  4. type 'hostname' to get the name of the machine
  5. 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.


  • No labels