-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
51 lines (41 loc) · 1.81 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
FROM fredhutch/r-shiny-server-base:4.4.1
RUN apt-get update -y
# Devtools dependencies
RUN apt-get install -y libfontconfig1-dev libharfbuzz-dev libfribidi-dev libfreetype6-dev libpng-dev libtiff5-dev libjpeg-dev curl libxml2 libxml2-dev libcurl4-openssl-dev libssl-dev r-cran-openssl libgit2-dev
RUN Rscript -e "install.packages('systemfonts')"
RUN Rscript -e "install.packages('textshaping')"
RUN Rscript -e "install.packages('ragg')"
# gdal dependencies
RUN apt-get install -y gdal-bin proj-bin libgdal-dev libproj-dev
# Load devtools and custom package
RUN Rscript -e "install.packages('devtools', dependencies=T)"
RUN Rscript -e "install.packages('leaflet', dependencies=T)"
RUN Rscript -e "install.packages('stringr', dependencies=T)"
RUN Rscript -e "install.packages('dplyr', dependencies=T)"
RUN Rscript -e "install.packages('tidyr', dependencies=T)"
RUN Rscript -e "install.packages('lubridate', dependencies=T)"
RUN Rscript -e "install.packages('evaluate', dependencies=T)"
RUN Rscript -e "install.packages('googlesheets4', dependencies=T)"
RUN Rscript -e "install.packages('shinydashboard', dependencies=T)"
RUN Rscript -e "install.packages('ggplot2', dependencies=T)"
# RUN Rscript -e "library(devtools);install_github('FredHutch/GDSCNsoilsites')"
# install the package
ADD . /src/GDSCNsoilsites
WORKDIR /src/GDSCNsoilsites
RUN R CMD INSTALL .
WORKDIR /srv/shiny-server/
RUN rm -rf /src/GDSCNsoilsites
RUN rm -rf /srv/shiny-server/
RUN mkdir -p /src/shiny-server/
COPY app/start.R /srv/shiny-server/app.R
COPY data /srv/shiny-server/data/
COPY www /srv/shiny-server/www/
RUN chown -R shiny:shiny /srv/shiny-server/
EXPOSE 3838
WORKDIR /srv/shiny-server/
ADD .secrets /srv/shiny-server/.secrets
RUN chown -R shiny:shiny .secrets
ENV APPLICATION_LOGS_TO_STDOUT=true
ENV SHINY_LOG_STDERR=1
#CMD /usr/bin/shiny-server
CMD R -f app.R