[main]: fix cache
Build and Push Docker Image / build (push) Successful in 22m11s

This commit is contained in:
John Gatward
2026-08-04 23:07:30 +01:00
parent 36c6fb5b53
commit 95d8175070
3 changed files with 4 additions and 4 deletions
+2 -4
View File
@@ -27,7 +27,7 @@ COPY .Rprofile /srv/shiny-server/.Rprofile
# Prevent renv attempting to use pak
ENV RENV_CONFIG_PAK_ENABLED=FALSE
ENV RENV_DOWNLOAD_METHOD=libcurl
ENV RENV_PATHS_CACHE=/opt/renv/cache
ENV RENV_PATHS_CACHE=/srv/shiny-server/renv/cache
# Some CRAN packages in this lockfile fail under Ubuntu hardening defaults
# because -Werror=format-security turns benign warnings into build failures.
@@ -38,9 +38,7 @@ RUN for f in /usr/local/lib/R/etc/Makeconf /usr/lib/R/etc/Makeconf; do \
done
# Install renv and restore project packages
RUN --mount=type=cache,target=/opt/renv/cache \
--mount=type=cache,target=/root/.cache/R/renv \
R --vanilla -e "install.packages('renv', repos='https://cran.rstudio.com')" && \
RUN R --vanilla -e "install.packages('renv', repos='https://cran.rstudio.com')" && \
R --vanilla -e "source('.Rprofile'); renv::restore(prompt=FALSE)"
# Copy the application after dependencies so regular code changes do not