Title
Ten simple rules for writing Dockerfiles for reproducible data science.
Abstract
Computational science has been greatly improved by the use of containers for packaging software and data dependencies. In a scholarly context, the main drivers for using these containers are transparency and support of reproducibility; in turn, a workflow's reproducibility can be greatly affected by the choices that are made with respect to building containers. In many cases, the build process for the container's image is created from instructions provided in a Dockerfile format. In support of this approach, we present a set of rules to help researchers write understandable Dockerfiles for typical data science workflows. By following the rules in this article, researchers can create containers suitable for sharing with fellow scientists, for including in scholarly communication such as education or scientific papers, and for effective and sustainable personal workflows. Author summary Computers and algorithms are ubiquitous in research. Therefore, defining the computing environment, i.e., the body of all software used directly or indirectly by a researcher, is important, because it allows other researchers to recreate the environment to understand, inspect, and reproduce an analysis. A helpful abstraction for capturing the computing environment is a container, whereby a container is created from a set of instructions in a recipe. For the most common containerisation software, Docker, this recipe is called a Dockerfile. We believe that in a scientific context, researchers should follow specific practices for writing a Dockerfile. These practices might be somewhat different from the practices of generic software developers in that researchers often need to focus on transparency and understandability rather than performance considerations. The rules presented here are intended to help researchers, especially newcomers to containerisation, leverage containers for open and effective scholarly communication and collaboration while avoiding the pitfalls that are especially irksome in a research lifecycle. The recommendations cover a deliberate approach to Dockerfile creation, formatting and style, documentation, and habits for using containers.
Year
DOI
Venue
2020
10.1371/journal.pcbi.1008316
PLOS COMPUTATIONAL BIOLOGY
DocType
Volume
Issue
Journal
16
11
ISSN
Citations 
PageRank 
1553-734X
0
0.34
References 
Authors
0
7
Name
Order
Citations
PageRank
Daniel Nüst183.76
Vanessa V. Sochat2171.81
Ben Marwick300.68
Stephen J. Eglen4174.07
Tim Head500.34
Tony Hirst600.34
Benjamin D. Evans731.13