2 Setup

2.1 Install with Docker

Docker can be installed on a Linux / Mac OS X machine without any complications as any other application, on Windows systems however it can be a little bit more troubling, there are many online resources to help. Please refer to the following links to install Docker on Windows Home, to setup the Linux Windows Subsystem and terminal and to execute Docker on Windows.

Once Docker is up and running, execute the following command on a bash terminal (make sure Docker is running, if not search for the Docker Desktop app and launch it) to download and launch ShinyDataSHIELD. Be aware that the Docker images weights ~ 1.5 GB, so if your internet connection is slow it may take a while.

docker run --rm -p 80:80 brgelab/shiny-data-shield

The container will be exposed on the local port 80 and it will render on that port the application itself, so to start using ShinyDataSHIELD open your web browser of choice and go to the site

localhost:80

At the beginning it may take some time for the application to render, this is because all the needed R libraries are being loaded, to be sure the container is actually working, take a look at the terminal where you inputed the Docker command, there you will see all the R verbose stating the libraries are being loaded.

Once the user has finished using ShinyDataSHIELD, the container needs to be stopped to avoid wasting CPU resources, to do so, input the following command on a bash terminal (the command needs to be inputed on a new bash window):

docker container ls

This will prompt all the running containers, find the one with the NAMES brgelab/shiny-data-shield and copy it’s CONTAINER ID, then input the following bash command:

docker stop xxxxxxxxxxxx

Where xxxxxxxxxxxx is the CONTAINER ID.

To run the application again, just enter the first bash command (docker run --rm -p 80:80 brgelab/shiny-data-shield), since it has already been downloaded, the application is cached on the computer and it will launch straight away. If the user wants to remove the Docker image from the computer, input the following bash command:

docker image rm brgelab/exposome-shiny

If the user wants to download the actual source code of the Shiny, install all the required packages and launch it locally on it’s machine, feel free to download it from Github. There’s a script called installer.R at the root of the repository with a short installer of all the required packages. Please note that the installer script may fail depending on the R version and others, for that reason is advised to always run the Docker version of ShinyDataSHIELD, as it only requires a single terminal command and will work no matter what.