Files
football-competitiveness/Dockerfile
T
John Gatward c7dedf471d
Build and Push Docker Image / build (push) Failing after 24m7s
[main]: fix Dockerfile
2026-08-04 20:26:46 +01:00

36 lines
953 B
Docker

FROM rocker/shiny:4.4.0
# System dependencies commonly required by R packages
RUN apt-get update && apt-get install -y \
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 CFLAGS=-Wno-error=format-security
# 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"]