|
1 | | -FROM debian:11.3-slim |
2 | | - |
3 | | -MAINTAINER Matt Eldridge "matthew.eldridge@cruk.cam.ac.uk" |
4 | | - |
5 | | -RUN apt-get update |
6 | | -RUN apt-get install -y build-essential |
7 | | -RUN apt-get install -y libxml2-dev |
8 | | -RUN apt-get install -y libssl-dev |
9 | | -RUN apt-get install -y curl |
10 | | -RUN apt-get install -y gdebi-core |
11 | | -RUN apt-get clean |
12 | | - |
13 | | -# install R (https://docs.rstudio.com/resources/install-r) |
14 | | -ARG R_VERSION=4.2.0 |
15 | | -RUN curl -O https://cdn.rstudio.com/r/debian-11/pkgs/r-${R_VERSION}_1_amd64.deb |
16 | | -RUN gdebi -n r-${R_VERSION}_1_amd64.deb |
17 | | -RUN rm r-${R_VERSION}_1_amd64.deb |
18 | | -RUN ln -s /opt/R/${R_VERSION}/bin/R /usr/local/bin/R |
19 | | -RUN ln -s /opt/R/${R_VERSION}/bin/Rscript /usr/local/bin/Rscript |
| 1 | +FROM debian:11.6-slim |
| 2 | + |
| 3 | +LABEL authors="Matt Eldridge" \ |
| 4 | + version="1.1" \ |
| 5 | + description="Base Docker image for Shiny applications" |
| 6 | + |
| 7 | +RUN apt-get update && \ |
| 8 | + apt-get install -y curl gdebi-core && \ |
| 9 | + apt-get clean |
20 | 10 |
|
21 | 11 | # install Shiny server (https://www.rstudio.com/products/shiny/download-server/ubuntu) |
22 | 12 | ARG SHINY_SERVER_VERSION=1.5.18.987-amd64 |
23 | 13 | RUN curl -O https://download3.rstudio.org/ubuntu-18.04/x86_64/shiny-server-${SHINY_SERVER_VERSION}.deb |
24 | 14 | RUN gdebi -n shiny-server-${SHINY_SERVER_VERSION}.deb |
25 | 15 | RUN rm shiny-server-${SHINY_SERVER_VERSION}.deb |
26 | 16 |
|
27 | | -# install R packages |
28 | | -RUN R -e 'install.packages("shiny", repos = "https://cloud.r-project.org")' |
29 | | -RUN R -e 'install.packages("shinyjs", repos = "https://cloud.r-project.org")' |
30 | | -RUN R -e 'install.packages("bslib", repos = "https://cloud.r-project.org")' |
31 | | -RUN R -e 'install.packages("rmarkdown", repos = "https://cloud.r-project.org")' |
32 | | -RUN R -e 'install.packages("colourpicker", repos = "https://cloud.r-project.org")' |
33 | | -RUN R -e 'install.packages("tidyverse", repos = "https://cloud.r-project.org")' |
34 | | -RUN R -e 'install.packages("plotly", repos = "https://cloud.r-project.org")' |
35 | | -RUN R -e 'install.packages("patchwork", repos = "https://cloud.r-project.org")' |
36 | | -RUN R -e 'install.packages("DT", repos = "https://cloud.r-project.org")' |
37 | | -RUN R -e 'install.packages("RSQLite", repos = "https://cloud.r-project.org")' |
38 | | - |
39 | 17 | # ensure the user account that is running the shiny server process has write privilege for /var/lib/shiny-server |
40 | 18 | RUN chmod ugo+rwx /var/lib/shiny-server |
41 | 19 |
|
| 20 | +ARG CONDA_VERSION=py310_23.1.0-1 |
| 21 | +ARG CONDA_SHA256=32d73e1bc33fda089d7cd9ef4c1be542616bd8e437d1f77afeeaf7afdb019787 |
| 22 | + |
| 23 | +RUN curl https://repo.anaconda.com/miniconda/Miniconda3-${CONDA_VERSION}-Linux-x86_64.sh -o miniconda3.sh && \ |
| 24 | + echo "${CONDA_SHA256} miniconda3.sh" > miniconda3.sha256 && \ |
| 25 | + sha256sum -c miniconda3.sha256 && \ |
| 26 | + mkdir -p /opt && \ |
| 27 | + sh miniconda3.sh -b -p /opt/conda && \ |
| 28 | + rm miniconda3.sh miniconda3.sha256 |
| 29 | + |
| 30 | +COPY conda.yml . |
| 31 | + |
| 32 | +RUN /opt/conda/bin/conda env create -f conda.yml && /opt/conda/bin/conda clean -a |
| 33 | + |
| 34 | +ENV PATH /opt/conda/envs/shiny_base/bin:$PATH |
| 35 | + |
42 | 36 | # expose port that Shiny server listens on (can be mapped to another port on the host) |
43 | 37 | EXPOSE 3838 |
44 | 38 |
|
|
0 commit comments