Not all images can be trusted! There have been examples of contaminated
images so investigate before using images blindly. Apply same caution as installing
software packages from untrusted package repositories.
Examples of useful Docker images
1) Run a specific version of Rstudio
docker run --rm -p 8787:8787 -e PASSWORD=yourpasswordhere rocker/rstudio
Singularity is aimed at scientific community and to run scientific workflows on HPC resources.
Docker images can be converted into Singularity images.
Container vs. image vs. recipe (Dockerfile)
Image is like a blueprint. It is immutable.
Container is an instance of an image.
Dockerfile is a recipe which creates a container based on an image and applies small changes to it.
Pros and cons of containers
Containers are popular for a reason - they solve a number of
important problems:
Allow for seamlessly moving workflows across different platforms.
Much more lightweight than virtual machines.
Eliminates the “works on my machine” situation.
For software with many dependencies, in turn with its own dependencies,
containers offer possibly the only way to preserve the
computational experiment for future reproducibility.
However, containers may also have some drawbacks:
Containers can have security vulnerabilities which can be exploited.
Can be used to hide away software installation problems and thereby
discourage good software development practices.
It may not be clear whether to record the environment in the image part or the recipe part.
Discussion: reproducibility aspects of container images
Do you think containers contribute to reproducible research?