Replies: 1 comment 2 replies
-
Hi Eric, many thanks for your input and for spreading the gospel about Nix! What you describe would indeed be helpful, but I wonder if we shouldn't present this in two ways:
I think it would make the most sense to write that in the existing vignette. Do you want to take a shot at it? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
My journey with Nix and more recently with
{rix}
has been quite a ride, but I have learned so much in the last few months for my open-source R development. Once I read the using Nix inside Docker vignette, I immediately pursued a use case of using those principles to develop a Shiny app as an R package with{golem}
, which I have been doing for many years in a VS-Code & devcontainer workflow using Docker as the container runtime. In a recent project under R Weekly, I created a Shiny app with{golem}
using{rix}
to bootstrap the development environment, which works perfectly for the user case. I presented this alongside my general impressions of Nix and{rix}
at the 2025 Shiny conference, and you can find the source code for the project here.Now to the main point: I was struggling with how the Docker builds would take a ton of time (even with using caching) whenever I made a small change to the application source code itself, but not making changes to the dependencies used for the app package. It only occurred to me recently that
{renv}
users leveraging Docker also encountered similar issues (myself included), and one of the key points in the Using{renv}
with Docker vignette was to leverage multi-stage builds in the Dockerfile such that the dependencies are taken care of in the first stage, and have the second stage only be concerned with the specific "package" development changes. I revised my Dockerfile for the application I'm building, and it worked perfectly! With all of this said, I propose that we add additional material (either to the existing Nix & Docker vignette or perhaps a new vignette) that covers this tweak. I think it will be a huge help to those coming to{rix}
for the first time and want to leverage containers for either CI/CD or deployments. Does that sound reasonable?Beta Was this translation helpful? Give feedback.
All reactions