Use a Docker Container

For easy and fast access to Storm, we provide Docker containers containing Storm in different versions. The Docker containers are similar to the Virtual machine but come with less overhead and offer more recent versions of Storm.

Install Docker

To use the containers you first have to install Docker. On macOS you can use homebrew to install Docker.

$ brew cask install docker

Next you should start the Docker app and its tray icon should be visible. If you are running Windows, you may need to reboot your machine for the Docker installation to be completed and available using the command line.

Download Docker Image

Then you have to download the Docker image you want to use. All available images can be found on DockerHub. Currently we offer the latest release and the most recent development versions of Storm. The most recent versions are built automatically each day and indicated by the suffix travis. Furthermore we also provide debug builds indicated by the suffix -debug.

Download the Storm container you want to use:

$ docker pull movesrwth/storm:travis

Run the Docker Image (Linux and macOS)

We want to be able to share files between the container and the host system. Therefore you should change the directory to the one you want to share, for example:

$ cd ~/Desktop/data

The next command starts the previously downloaded image and enables file sharing with the current directory:

$ docker run --mount type=bind,source="$(pwd)",target=/data -w /opt/storm/build/bin --rm -it --name storm movesrwth/storm:travis

After executing the command you are now within the Docker container indicated by a different prompt:

root@1234xyz:/opt/storm/build/bin#

The file sharing directory is located at /data for the example directories above. You can now continue with testing the container.

Run the Docker Image (Windows)

We want to be able to share files between the container and the host system. For this we need to configure Docker Desktop to enable drive sharing on a drive you want to enable it on.

We will refer to the host directory you want to direct output to as %hostdir% and to the virtual directory of the container as %sharedir%. Any file written to %sharedir% within the Storm container will later be located at %hostdir% on your host machine. For this demo we use the following directories, which you can export for testing:

set hostdir=%HOMEDRIVE%%HOMEPATH%\Desktop\data
set sharedir=/data

First create the directory on the host machine. Then change the current directory to it.

%HOMEDRIVE%
mkdir %hostdir%
cd %hostdir%

Head over to the Docker settings panel by right-clicking the Docker icon in your system tray and selecting Settingsā€¦. In the Shared Drives option tick the drive letters you want to make Storm available (usually C, as in this example), then hit Apply.

The next command starts the previously downloaded image and enables file sharing with the earlier set directory:

> docker run --mount type=bind,source=%hostdir%,target=%sharedir% -w /opt/storm/build/bin --rm -it --name storm movesrwth/storm:travis

After executing the command you are now within the Docker container indicated by a different prompt:

root@1234xyz:/opt/storm/build/bin#

The file sharing directory is located at /data for the example directories above. You can now continue with testing the container.

Testing the Container

After running the Docker Image according to the commands above, you can start using Storm within this container:

$ ./storm --version

To try out file sharing execute:

$ ./storm --prism ../../resources/examples/testfiles/dtmc/die.pm --io:exportexplicit /data/die.drn

Afterwards there should be a file named die.drn in the shared directory now.

In the end exit the container. A clean-up is performed automatically.

$ exit