Using StochSS on Windows
StochSS requires Docker Toolbox for Windows to run. This means you will need a 64 bit Windows installation that supports Docker (Windows 64 7, 8, and 10, should all work).
Please note:
- StochSS does not run on Microsoft Edge browser. The recommended browser is Google Chrome.
- You may have to enable virtualization in the BIOS (Use this Microsoft Virtualization detector to check if virtualization is enabled in your system: https://www.microsoft.com/en-us/download/details.aspx?id=592. If it’s not, please enable it from the BIOS first).
Running StochSS
- Install Docker Toolbox from here.
- To paste text from your clipboard to Docker Quickstart terminal, right click onto the terminal screen.
- To copy text from the Docker Quickstart terminal onto your clipboard, highlight the desired text and press enter/return.
- Open the Docker QuickStart Terminal. Run the following commands:
docker-machine start stochss1-9 || docker-machine create --driver virtualbox stochss1-9
eval "$(docker-machine env stochss1-9)"
This will start/create a Virtual Machine called `stochss1-9`, and give you terminal access to it. StochSS will run in this machine. To verify that the machine is running, run the following command:
docker-machine ls
You should see that the status of machine `stochss1-9` is running.
Please note the IP address of the of the machine `stochss1-9`. Run the following command to determine the IP address:docker-machine ip stochss1-9
In step 4 (below), use this IP address instead of “0.0.0.0“.
- If this is the first time you’re starting StochSS, run the following to start StochSS container:
docker run -i -t -p 9999:9999 -p 8080:8080 --name=stochsscontainer1_9 stochss/stochss-launcher:1.9 "/bin/bash"
This will download the StochSS docker image, create the StochSS docker container and give terminal access to it.
Otherwise, if you already have a StochSS docker container (i.e. when you use StochSS subsequently), rundocker start stochsscontainer1_9
docker exec -ti stochsscontainer1_9 /bin/bash
- Run the following commands to start the server:
cd stochss-master
./run.ubuntu.sh -a 0.0.0.0 -t secretkey
Navigate to the URL displayed to access StochSS.
- Follow the instructions on the terminal to kill the server process. After that, run the following commands to stop the container:
exit
docker stop stochsscontainer1_9
docker-machine stop stochss1-9
These commands will stop the container and virtual machine. The terminal window can now be safely closed.
Uninstalling StochSS
- Open the Docker Quickstart terminal
- Run the following commands:
docker-machine rm stochss1-9 (if using docker-machine)
d
ocker rm stochsscontainer1_9
d
ocker rmi stochss/stochss-launcher:1.9
Note on security
When you run StochSS, it is encapsulated inside a virtual machine. If something goes wrong with the StochSS virtual machine, it is isolated from everything else on your system.
When things go wrong
- Launching and using StochSS on Windows is error-prone. Some useful commands that may help you in figuring out what’s going on when things don’t work as expected are:
docker-machine ls
will list the virtual machines running and their status.docker ps
will list the containers that are running.docker ps -aq
will list _all_ containers in the virtual machine, running or stopped.
- Leaving StochSS is running while the computer goes to sleep can cause the network configuration of the virtual machine to change unexpectedly when the computer is woken up again. This means that StochSS could become temporarily inaccessible. Performing the following steps may solve this:Open a Docker Quickstart terminal window and Run:
docker-machine start stochss1-9
docker-machine ssh stochss1-9
docker stop stochsscontainer1_9
docker start stochsscontainer1_9
exit
Follow the instructions in this guide to start StochSS.
Our suspicion is that when we ssh into the virtual machine, it’s network configuration is reset/corrected.