2.2 Docker image
Docker images are provided to easily install a reproducible environment with R
, patRoon
and nearly all of its dependencies. This section assumes you have a basic understanding of Docker and have it installed. If not, please refer to the many guides available on the Internet. The Docker images of patRoon
were originally only used for automated testing, however, since these contain a complete working environment of patRoon
they are also suitable for using the software. They come with all external dependencies (except ProteoWizard), R
dependencies and MetFrag
libraries. Furthermore, the Docker image also contains RStudio server, which makes using patRoon
even easier.
Below are some example shell commands on how to run the image.
# run an interactive R console session
docker run --rm -it uva-hva.gitlab.host:4567/r.helmus/patroon/patroonrs
# run a linux shell, from which R can be launched
docker run --rm -it uva-hva.gitlab.host:4567/r.helmus/patroon/patroonrs bash
# run rstudio server, accessible from localhost:8787
# login with rstudio/yourpasswordhere
docker run --rm -p 8787:8787 -u 0 -e PASSWORD=yourpasswordhere uva-hva.gitlab.host:4567/r.helmus/patroon/patroonrs /init
# same as above, but mount a local directory (~/myvolume) as local volume so it can be used for persistent storage
# please ensure that ~/myvolume exists!
docker run --rm -p 8787:8787 -u 0 -e PASSWORD=yourpasswordhere -v ~/myvolume:/home/rstudio/myvolume uva-hva.gitlab.host:4567/r.helmus/patroon/patroonrs /init
Note that the first two commands run as the default user rstudio
, while the last two as root
. The last commands launch RStudio server. You can access it by browsing to localhost:8787
and logging in with user rstudio
and the password defined by the PASSWORD
variable from the command (yourpasswordhere
in the above example). The last command also links a local volume in order to obtain persistence of files in the container’s home directory. The Docker image is based on the excellent work from the rocker project. For more information on RStudio related options see their documentation for the RStudio image.