docker_run_rserver: Run an RStudio instance on the bioconductor docker image

Description Usage Arguments References Examples

View source: R/docker_shell.R

Description

A wrapper for the docker function used to run a RStudio container on a specified docker image. This will be available at the port specified on the host. Currently, the permissions argument operates through setting a USERID and GROUPID, which are by default set to my user's settings. In order to make sure your volumes have the correct permissions, these settings should be modified to match the user of interest.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
docker_run_rserver(
  image = "bioconductor/bioconductor_docker:RELEASE_3_12",
  port = 8888,
  password = "bioc",
  name = "dz_bioc",
  rm = FALSE,
  volumes = NULL,
  volumes_ro = NULL,
  permissions = "match",
  USERID = 1002,
  GROUPID = 1024,
  verbose = TRUE
)

Arguments

image

character(1) name of the image to use

port

integer(1) port of the host which will be used to access RStudio server via localhost::port.

password

character(1) password to used for RStudio server.

name

character(1) name for the container.

rm

logical(1) whether to use the -rm flag when running the container. Should the container be removed when stopped?

volumes

character(1) paths for the hosts files that you want accessible in the container. See argument permissions for read/write access to these. Can either be a path on host or in the form "host_path:container_path".

volumes_ro

character(1) paths for the hosts files that you want accessible in the container. These will be read-only on the container and this option is recommended for any volumes you don't need to modify.

permissions

character(1) if set to "match" (be careful!), then the permissions of the mounted volumes on the container, will match that of the host. I.e. the user executing the docker command will have permissions to read/write/execute in the container as they did on the host.

USERID

integer(1) the USERID of the user for which you would like the permissions of the mounted volumes to match.

GROUPID

integer(1) the GROUPID of the user for which you would like the permissions of the mounted volumes to match.

verbose

logical(1) whether to display the command to be run (for debugging purposes).

References

docker_run_rserver is based on https://github.com/LieberInstitute/megadepth/blob/master/R/megadepth.R. The solution for the permissions of the volumes was taken from https://github.com/rocker-org/rocker/wiki/Sharing-files-with-host-machine.

Examples

1
2
3
4
## Not run: 
docker_run_rserver()

## End(Not run)

dzhang32/rutils documentation built on April 2, 2021, 7:31 p.m.