[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
+1
View File
@@ -5,6 +5,7 @@
.gitignore .gitignore
renv/library renv/library
renv/cache
renv/staging renv/staging
*.Rproj *.Rproj
+1
View File
@@ -10,6 +10,7 @@
# renv local library/state (keep renv.lock and renv/activate.R tracked) # renv local library/state (keep renv.lock and renv/activate.R tracked)
renv/library/ renv/library/
renv/cache/
renv/python/ renv/python/
renv/staging/ renv/staging/
+2 -4
View File
@@ -27,7 +27,7 @@ COPY .Rprofile /srv/shiny-server/.Rprofile
# Prevent renv attempting to use pak # Prevent renv attempting to use pak
ENV RENV_CONFIG_PAK_ENABLED=FALSE ENV RENV_CONFIG_PAK_ENABLED=FALSE
ENV RENV_DOWNLOAD_METHOD=libcurl 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 # Some CRAN packages in this lockfile fail under Ubuntu hardening defaults
# because -Werror=format-security turns benign warnings into build failures. # 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 done
# Install renv and restore project packages # Install renv and restore project packages
RUN --mount=type=cache,target=/opt/renv/cache \ RUN R --vanilla -e "install.packages('renv', repos='https://cran.rstudio.com')" && \
--mount=type=cache,target=/root/.cache/R/renv \
R --vanilla -e "install.packages('renv', repos='https://cran.rstudio.com')" && \
R --vanilla -e "source('.Rprofile'); renv::restore(prompt=FALSE)" R --vanilla -e "source('.Rprofile'); renv::restore(prompt=FALSE)"
# Copy the application after dependencies so regular code changes do not # Copy the application after dependencies so regular code changes do not