IDEAS home Printed from https://ideas.repec.org/a/plo/pcbi00/1008316.html
   My bibliography  Save this article

Ten simple rules for writing Dockerfiles for reproducible data science

Author

Listed:
  • Daniel Nüst
  • Vanessa Sochat
  • Ben Marwick
  • Stephen J Eglen
  • Tim Head
  • Tony Hirst
  • Benjamin D Evans

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.

Suggested Citation

  • Daniel Nüst & Vanessa Sochat & Ben Marwick & Stephen J Eglen & Tim Head & Tony Hirst & Benjamin D Evans, 2020. "Ten simple rules for writing Dockerfiles for reproducible data science," PLOS Computational Biology, Public Library of Science, vol. 16(11), pages 1-24, November.
  • Handle: RePEc:plo:pcbi00:1008316
    DOI: 10.1371/journal.pcbi.1008316
    as

    Download full text from publisher

    File URL: https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1008316
    Download Restriction: no

    File URL: https://journals.plos.org/ploscompbiol/article/file?id=10.1371/journal.pcbi.1008316&type=printable
    Download Restriction: no

    File URL: https://libkey.io/10.1371/journal.pcbi.1008316?utm_source=ideas
    LibKey link: if access is restricted and if your library uses this service, LibKey will redirect you to where you can use your library subscription to access this item
    ---><---

    References listed on IDEAS

    as
    1. Greg Wilson & D A Aruliah & C Titus Brown & Neil P Chue Hong & Matt Davis & Richard T Guy & Steven H D Haddock & Kathryn D Huff & Ian M Mitchell & Mark D Plumbley & Ben Waugh & Ethan P White & Paul Wi, 2014. "Best Practices for Scientific Computing," PLOS Biology, Public Library of Science, vol. 12(1), pages 1-7, January.
    2. Greg Wilson & Jennifer Bryan & Karen Cranston & Justin Kitzes & Lex Nederbragt & Tracy K Teal, 2017. "Good enough practices in scientific computing," PLOS Computational Biology, Public Library of Science, vol. 13(6), pages 1-20, June.
    3. Adam Rule & Amanda Birmingham & Cristal Zuniga & Ilkay Altintas & Shih-Cheng Huang & Rob Knight & Niema Moshiri & Mai H Nguyen & Sara Brin Rosenthal & Fernando Pérez & Peter W Rose, 2019. "Ten simple rules for writing and sharing computational analyses in Jupyter Notebooks," PLOS Computational Biology, Public Library of Science, vol. 15(7), pages 1-8, July.
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Glenda M Yenni & Erica M Christensen & Ellen K Bledsoe & Sarah R Supp & Renata M Diaz & Ethan P White & S K Morgan Ernest, 2019. "Developing a modern data workflow for regularly updated data," PLOS Biology, Public Library of Science, vol. 17(1), pages 1-12, January.
    2. John D Blischak & Emily R Davenport & Greg Wilson, 2016. "A Quick Introduction to Version Control with Git and GitHub," PLOS Computational Biology, Public Library of Science, vol. 12(1), pages 1-18, January.
    3. Benjamin D Lee, 2018. "Ten simple rules for documenting scientific software," PLOS Computational Biology, Public Library of Science, vol. 14(12), pages 1-6, December.
    4. Sean C Anderson & Cole C Monnahan & Kelli F Johnson & Kotaro Ono & Juan L Valero, 2014. "ss3sim: An R Package for Fisheries Stock Assessment Simulation with Stock Synthesis," PLOS ONE, Public Library of Science, vol. 9(4), pages 1-7, April.

    More about this item

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:plo:pcbi00:1008316. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: ploscompbiol (email available below). General contact details of provider: https://journals.plos.org/ploscompbiol/ .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.