Docker

We also provide a Docker image with a SPEX installation which can run on any platform supported by Docker. To use this option, you first need to install Docker on your machine. See this link for instructions.

When the docker application is installed, you can download the SPEX image from the docker cloud:

docker pull spexxray/spex:latest

If the image is downloaded successfully, you can run SPEX in a so-called container. To make sure you can access your files, you can mount a local directory into the container. In addition, the container also needs access to a local X server. This is all arranged with flags to the ‘docker run’ command. We advise you to make a script like this:

#!/bin/bash

docker run -it \

           -e DISPLAY=$DISPLAY \

           -e LOCAL_USER_ID=`id -u $USER` \

           -v /tmp/.X11-unix:/tmp/.X11-unix \

           -v /YOUR_DATA_DIR:/home/user \

           -w /home/user \

           spexxray/spex:latest

Please change ‘YOUR_DATA_DIR’ to the directory path where you keep your spectral data.

Docker on Mac

To use X11 on Mac, you need to install XQuartz (or a similar X11 server) and set it to ‘Allow connections from network clients’ in the XQuartz settings. In addition, the X server should be set to allow incoming connections from localhost on the command line:

user@macos:~> xhost +127.0.0.1

Then the DISPLAY variable on the docker run line should be set to host.docker.internal:0 . The run command on Mac looks like this:

docker run -it \

           -e DISPLAY=host.docker.internal:0 \

           -e LOCAL_USER_ID=`id -u $USER` \

           -v /tmp/.X11-unix:/tmp/.X11-unix \

           -v /Users/myusername:/home/user \

           -w /home/user \

           spexxray/spex:latest

Older SPEX versions

Older SPEX versions are also available in Docker cloud. See this site for an overview of the available versions. You can download the version by appending the version tag to the docker pull command like this:

docker pull spexxray/spex:3.04.00

Important note

The Docker application runs containers as root, which could create a security breach and give users root access on their local machines. Therefore, do not give docker access to non-trusted users.