nuest / ten-simple-rules-dockerfiles

Ten Simple Rules for Writing Dockerfiles for Reproducible Data Science
https://doi.org/10.1371/journal.pcbi.1008316
Creative Commons Attribution 4.0 International
64 stars 15 forks source link

Optimising container for use #29

Closed psychemedia closed 4 years ago

psychemedia commented 4 years ago

https://github.com/nuest/ten-simple-rules-dockerfiles/blob/4a87e3e3ad43feacd98722f1521e500191bb17bb/ten-simple-rules-dockerfiles.Rmd#L103

Should is a danger word... it begs the question: what it an optimised image? Are there rules for creating Dockerfiles that as a side-effect make it more, rather than less, likely that your image will be "optmized" ?

vsoch commented 4 years ago

sure, we can change to "is suggested to"

psychemedia commented 4 years ago

But this still leaves open questions about what makes for optimised containers or where the reader can go to learn more about building optimised containers?

vsoch commented 4 years ago

You can't answer that here, "optimized" means different things for different use cases. For something that needs to be downloaded 100,000 times and run on a cluster, "optimized" might mean small in size. For another one that needs to work across platform, "optimized" might mean supporting the most hosts. This article is a general guide for best practices, and there is no way we can explicitly state what "optimized" means.

psychemedia commented 4 years ago

So why say "optimised" unless you qualify it or refer the reader to somewhere that discusses/addresses it? If the intended reader is someone who is looking to try to develop best practice, then saying "optimise your container. period." could just leave them confused about what that means?

vsoch commented 4 years ago

Because it's still safe to say that a container can be optimized for its use case, the meaning of optimized depending on the use case.