-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
50 lines (42 loc) · 1.47 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 rocker/r-ver:4.0.1
RUN apt-get update && apt-get install -y \
gdebi-core \
pandoc \
libxml2-dev \
libssl-dev \
pandoc-citeproc \
libcurl4-gnutls-dev \
libcairo2-dev \
libxt-dev \
xtail \
wget \
libssh2-1-dev \
libsasl2-dev \
libnode-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/
# Download and install shiny server
RUN wget --no-verbose https://download3.rstudio.org/ubuntu-14.04/x86_64/VERSION -O "version.txt" && \
VERSION=$(cat version.txt) && \
wget --no-verbose "https://download3.rstudio.org/ubuntu-14.04/x86_64/shiny-server-$VERSION-amd64.deb" -O ss-latest.deb && \
gdebi -n ss-latest.deb && \
rm -f version.txt ss-latest.deb && \
rm -rf /usr/local/lib/R/site-library/shiny/examples && \
rm -rf /var/lib/apt/lists/* && \
mkdir -p /var/log/shiny-server && \
chown shiny.shiny /var/log/shiny-server && \
rm -rf /srv/shiny-server/* && \
mkdir /srv/shiny-server/shiny
# install shiny R package
RUN install2.r --error shiny && rm -rf tmp/downloaded_packages/*
# copy the setup script, run it, then delete it
# By splitting this from the line above you can more quickly add/remove packages
COPY src/setup.R /
RUN Rscript setup.R && rm setup.R
# Use the appropriate shiny-server.conf
COPY shiny-server.conf /etc/shiny-server/shiny-server.conf
# copy the r folder and data
COPY src /srv/shiny-server/shiny/
# copy the run script
COPY run.sh /usr/bin/run.sh
ENTRYPOINT ["usr/bin/run.sh"]