Skip to content
Snippets Groups Projects

move ARG

Merged Bryan BRANCOTTE requested to merge improve-build-speed-3 into main
1 file
+ 2
2
Compare changes
  • Side-by-side
  • Inline
+ 2
2
@@ -3,8 +3,6 @@ FROM ubuntu:focal
@@ -3,8 +3,6 @@ FROM ubuntu:focal
# define geographic location during R installation
# define geographic location during R installation
ENV TZ=Etc/UTC
ENV TZ=Etc/UTC
ENV DEBIAN_FRONTEND=noninteractive
ENV DEBIAN_FRONTEND=noninteractive
ARG SHINY_SERVER_VERSION=latest
ARG R_VERSION=latest
EXPOSE 3838
EXPOSE 3838
CMD ["shiny-server"]
CMD ["shiny-server"]
@@ -41,6 +39,7 @@ COPY ./scripts/install_r_cran.sh /opt/scripts/install_r_cran.sh
@@ -41,6 +39,7 @@ COPY ./scripts/install_r_cran.sh /opt/scripts/install_r_cran.sh
# Copy the R archive is already present, otherwise it will be downloaded
# Copy the R archive is already present, otherwise it will be downloaded
# COPY ./R*.tar.gz /tmp/
# COPY ./R*.tar.gz /tmp/
 
ARG R_VERSION=latest
# Install R, along with its dependencies
# Install R, along with its dependencies
RUN /opt/scripts/install_r_cran.sh
RUN /opt/scripts/install_r_cran.sh
# Test R in another layer
# Test R in another layer
@@ -49,6 +48,7 @@ RUN R -q -e "sessionInfo()"
@@ -49,6 +48,7 @@ RUN R -q -e "sessionInfo()"
# Copy the remaining scripts
# Copy the remaining scripts
COPY ./scripts /opt/scripts
COPY ./scripts /opt/scripts
 
ARG SHINY_SERVER_VERSION=latest
# Install R packages included Shiny, then install shiny server
# Install R packages included Shiny, then install shiny server
RUN /opt/scripts/configure_Rprofile.sh \
RUN /opt/scripts/configure_Rprofile.sh \
&& Rscript /opt/scripts/install_r_packages.R
&& Rscript /opt/scripts/install_r_packages.R
Loading