Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
oadetayo authored Jan 10, 2025
1 parent 3aaeb65 commit 4e13c9a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM rocker/r-ver:4.4.2

ENV DEBIAN_FRONTEND=noninteractive
ENV RENV_PACKAGE_TYPE=binary

# 1. Update and install fundamental packages
RUN apt-get update -y && \
Expand Down Expand Up @@ -29,10 +30,13 @@ RUN add-apt-repository -y universe && \
libxml2-dev

# 3. Configure R to use CRAN binaries
RUN echo 'options(repos = c(CRAN = "https://cloud.r-project.org"))' >> /usr/local/lib/R/etc/Rprofile.site && \
echo 'options(pkgType = "binary")' >> /usr/local/lib/R/etc/Rprofile.site
RUN echo 'options(repos = c(CRAN = "https://cloud.r-project.org"))' >> /usr/local/lib/R/etc/Rprofile.site

# 4. Clean up package caches
# 4. Install renv globally
RUN R -e "install.packages('renv', repos = 'https://cloud.r-project.org')"

# 5. Clean up package caches
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*


ENTRYPOINT ["/bin/bash"]

0 comments on commit 4e13c9a

Please sign in to comment.