Skip to content

Commit

Permalink
add docker explanation and compare to renv
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbudzynski committed Nov 20, 2024
1 parent 6c29c59 commit 6c41166
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion _drafts/docker-for-R.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,26 @@ machines (VMs) and Docker might have seemed like the domain of software
engineers, far removed from the world of statistical models, tidy data, and
ggplots. But as the complexity of data science workflows has grown, the ability
to manage environments, ensure reproducibility, and collaborate effectively has
become critical. That’s where Docker comes in.
become critical. That’s where Docker comes in.

At its core, Docker is a platform that helps you package and run applications in
isolated environments called containers. A container is like a virtual box that
holds everything your R project needs to run—R itself, libraries, system
dependencies, and even a specific operating system. Unlike traditional virtual
machines, Docker containers are lightweight, efficient, and portable.

For R users, Docker offers a way to ensure that your code runs exactly the same
anywhere, from your laptop to a cloud server. No more "it works on my machine"
excuses!

You may be thinkging, "But I alredy have R installed on my computer and I use
renv. That's enough, right?" Well, not quite. While renv is excellent for
managing R package dependencies and ensuring reproducibility at the package
level, it falls short in addressing system-level dependencies, R versioning, and
cross-platform compatibility. Docker, by contrast, packages the entire
environment—including the operating system, R version, and required system
libraries—ensuring your project runs identically anywhere. Additionally, Docker
offers seamless integration with other tools and workflows, such as deploying
Shiny apps or APIs, and avoids dependency conflicts by isolating projects
completely. While renv is easier for quick package management, Docker provides a
comprehensive solution for full-stack reproducibility and deployment.

0 comments on commit 6c41166

Please sign in to comment.