-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.app
49 lines (39 loc) · 1.52 KB
/
Dockerfile.app
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
# Install Java
FROM openjdk:8
# Install Ubuntu packages
RUN apt-get update && apt-get install -y \
sudo \
gdebi-core \
pandoc \
pandoc-citeproc \
libcurl4-gnutls-dev \
libcairo2-dev \
libxt-dev \
libssl-dev \
libsasl2-dev \
r-base \
r-base-dev
# Download and install Shiny Server
RUN wget --no-verbose https://s3.amazonaws.com/rstudio-shiny-server-os-build/ubuntu-12.04/x86_64/VERSION -O "version.txt" && \
VERSION=$(cat version.txt) && \
wget --no-verbose "https://s3.amazonaws.com/rstudio-shiny-server-os-build/ubuntu-12.04/x86_64/shiny-server-$VERSION-amd64.deb" -O ss-latest.deb && \
gdebi -n ss-latest.deb && \
rm -f version.txt ss-latest.deb
# Config Java
RUN sudo R CMD javareconf JAVA_HOME=$JAVA_HOME
# Install R packages that are required
RUN R -e "install.packages(c('shiny', 'bslib', 'magrittr', 'thematic', 'dbplyr', 'lubridate', 'leaflet', 'ggplot2', 'remotes'), repos='http://cran.rstudio.com/')"
RUN R -e "remotes::install_github('deepanshu88/summaryBox')"
RUN R -e "remotes::install_version('rJava', '0.9-11')"
RUN R -e "install.packages('RJDBC')"
# Copy configuration files into the Docker image
COPY shiny-server.conf /etc/shiny-server/shiny-server.conf
COPY app.R /srv/shiny-server/
# Make the ShinyApp available at port 80
EXPOSE 8080
# Copy further configuration files into the Docker image
COPY shiny-server.sh /usr/bin/shiny-server.sh
# Jar file
COPY jars /srv/shiny-server/jars
RUN ["chmod", "+x", "/usr/bin/shiny-server.sh"]
CMD ["/usr/bin/shiny-server.sh"]