Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

renv for Dockerfiles? #6

Open
MarkEdmondson1234 opened this issue Nov 18, 2019 · 2 comments
Open

renv for Dockerfiles? #6

MarkEdmondson1234 opened this issue Nov 18, 2019 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@MarkEdmondson1234
Copy link
Owner

May be easier to load renv for the package dependencies in a Dockerfile

@MarkEdmondson1234
Copy link
Owner Author

@MarkEdmondson1234
Copy link
Owner Author

Good example here: https://www.robertmylesmcdonnell.com/content/posts/docker/

FROM r-base:3.6.0
WORKDIR /main
RUN apt-get update \
    && apt-get -y install python3.7 \
    && apt -y install python3-pip
RUN pip3 install pandas==0.25.1
# renv and R packages
ENV RENV_VERSION 0.9.2-31
RUN echo "options(renv.consent = TRUE)" >> .Rprofile
COPY renv.lock .
RUN R -e "install.packages('remotes', repos = c(CRAN = 'https://cloud.r-project.org'))"
RUN R -e "remotes::install_github('rstudio/renv@${RENV_VERSION}')"
RUN R -e "renv::restore(confirm = FALSE)"
RUN R -e "renv::snapshot(confirm = FALSE)"
CMD ["Rscript", "r_processx.R"]

@MarkEdmondson1234 MarkEdmondson1234 added the enhancement New feature or request label Feb 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant