Files
football-competitiveness/Dockerfile
T
John Gatward 699a969a81
Build and Push Docker Image / build (push) Failing after 14m57s
[main]: install curl in dockerfile
2026-08-04 20:58:01 +01:00

45 lines
1.3 KiB
Docker

FROM rocker/shiny:4.4.0
# System dependencies commonly required by R packages
RUN apt-get update && apt-get install -y \
curl \
libcurl4-openssl-dev \
libssl-dev \
libxml2-dev \
libgit2-dev \
libfontconfig1-dev \
libharfbuzz-dev \
libfribidi-dev \
libfreetype6-dev \
libpng-dev \
libjpeg-dev \
libtiff5-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /srv/shiny-server
# Copy the application
COPY . /srv/shiny-server/
# Prevent renv attempting to use pak
ENV RENV_CONFIG_PAK_ENABLED=FALSE
ENV RENV_DOWNLOAD_METHOD=libcurl
# Some CRAN packages in this lockfile fail under Ubuntu hardening defaults
# because -Werror=format-security turns benign warnings into build failures.
RUN for f in /usr/local/lib/R/etc/Makeconf /usr/lib/R/etc/Makeconf; do \
if [ -f "$f" ]; then \
sed -i 's/-Werror=format-security/-Wno-error=format-security/g' "$f"; \
fi; \
done
# Install renv and restore project packages
RUN R --vanilla -e "install.packages('renv', repos='https://cran.rstudio.com')" && \
R --vanilla -e "renv::restore(project='/srv/shiny-server', lockfile='/srv/shiny-server/renv.lock', prompt=FALSE)"
# Permissions
RUN chown -R shiny:shiny /srv/shiny-server
EXPOSE 3838
CMD ["/usr/bin/shiny-server"]