No local installation of R or RStudio from now!
I only use Docker images now for my R and RStudio needs.
I’ve not installed R or RStudio on my local machine, though I work at Bioconductor, *a total R shop*. I spend most of my day in R.
I’ve implemented a couple of new images called the
bioconductor/bioconductor_docker . They have the most recent release of Bioconductor with R 3.6.2 and devel version of Bioconductor and R (“Unsuffered Consequences").
I alias both containers from my
.zshrc file, (if you use the bash shell, you’ll have a
.bashrc file. If you don’t know which shell you are using try,
RELEASE_3_10 alias, add
alias dockR_3_10=’docker run --rm -d \
-e PASSWORD=bioc \
-p 8787:8787 \
-v ~/shared/RELEASE_3_10/library-store/:/usr/local/lib/R/host-site-library \
devel alias, add
alias dockR=’docker run --rm -d \
-e PASSWORD=bioc \
-p 8888:8787 \
-v ~/shared/devel/library-store/:/usr/local/lib/R/host-site-library \
Once you have added these commands, either restart your Terminal or
source .zshrc file.
Some notes about these commands,
- I share two volumes, first, the compiled libraries are stored on a mounted volume from my local machine,
~/shared/<Bioconductor version>/library-store/, and second, my set of files I’d like to work in
~/Documents. I bind these volumes to paths which are defined to work, like the
/usr/local/lib/R/host-site-library[this is first on the search path
/home/bioc[just the home directory].
- The RStudio username for these containers is going to be
bioc. If you **DON’T** want any authentication, you can replace the line
-e PASSWORD=<my password>with
-e DISABLE_AUTH=true. This will let RStudio login without any authentication.
- I can simultaneously launch both versions of R on my local machine, and have two running RStudio instances, devel at https://localhost:8888 and RELEASE_3_10 at https://localhost:8787.
- I like have the
--rmbecause running containers with
--rmflag is good for those containers that you use for short while just to accomplish something, e.g., compile your application inside a container, or just testing something that it works, and then you are know its a short lived container and you tell your Docker daemon that once its done running, erase everything related to it and save the disk space. But this is not needed for most people.
-dwill detach and run container in background and print container ID.
- If you want the
biocuser to be a ROOT user, i.e with sudo capabilities to install new linux dependencies, you can add the environment variable
Links and More information: