Docker containers for Bioconductor
Docker allows software to be packaged into
containers: self-contained environments that contain everything
needed to run the software. Containers can be run anywhere
(containers run in modern Linux kernels, but can be run
on Windows and Mac as well using a virtual machine called
Containers can also be deployed in the cloud using
Amazon EC2 Container Service
or other cloud providers.
With Bioconductor containers, we hope to enhance
- reproducibility: If you run some code in a container today,
you can run it again in the same container (with the same
years later and know that nothing in the container has changed.
You should always take note of the tag you used if you think
you might want to reproduce some work later.
- ease of use: With one command, you can be running the
latest release or devel Bioconductor. No need to worry
about whether packages and system dependencies are
- convenience: Sometimes you just want a fresh R with
no packages installed, in order to test something; or
you typically don’t have microarray packages installed
but suddenly you need to do a microarray analysis.
Containers make this easy.
Our aim is to provide up-to-date containers for the current
release and devel versions of Bioconductor, and (probably, eventually)
some older versions.
Bioconductor’s Docker images are stored in
the source Dockerfiles are in
Our release images are based on rocker/rstudio and our devel
images are based on rocker/rstudio-daily.
For each supported version of Bioconductor, we provide several
- base: Contains R, RStudio, and a single Bioconductor
biocLite() function for installing additional
Also contains many system dependencies for Bioconductor packages.
Useful when you want a relatively blank slate for testing purposes.
R is accessible via the command line or via RStudio Server.
The release and devel versions of these containers (and the
containers built from them, below) are rebuilt
daily with the latest versions of R-release or R-devel
(with previous versions available via tags).
- core: Built on base, so it contains everything in base, plus
a selection of core Bioconductor packages.
See the full list.
- flow: everything in core, plus all packages tagged with the
- microarray: everything in core, plus
all packages tagged with the
- proteomics: everything in core, plus all packages tagged with the
- sequencing: everything in core, plus all packages tagged with the
- metabolomics: everything in core, plus all packages tagged with the
List of Containers
At present, the following containers are available:
Using the containers
The following examples use the
Note that you may need to prepend
sudo to all
Prerequisites: On Linux, you need Docker
you need Docker Toolbox installed and running.
To run RStudio Server:
docker run -p 8787:8787 bioconductor/devel_base
You can then open a web browser pointing to your docker host on port 8787.
If you’re on Linux and using default settings, the docker host is
localhost, so the full URL to RStudio would be
http://localhost:8787). If you are on Mac or Windows and running
Docker Toolbox, you can determine the docker host with the
docker-machine ip default command.
Log in to RStudio with the username
rstudio and password
If you want to run RStudio as a user on your host machine, in order
to read/write files in a host directory, please
To run R from the command line:
docker run -ti bioconductor/devel_base R
To open a Bash shell on the container:
docker run -ti bioconductor/devel_base bash
docker run command is very powerful and versatile.
For full documentation, type
docker run --help or visit
the help page.
Modifying the images
There are two ways to modify these images:
- Making changes in a running container and then committing them
docker commit command.
- Using a Dockerfile to declare the changes you want to make.
The second way is the recommended way. Both ways are
List of packages installed on the core container
These packages, plus their dependencies, are installed:
Thanks to the
rocker project for providing the
R/RStudio Server containers upon which ours are based.