-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
executable file
·59 lines (48 loc) · 1.49 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
51
52
53
54
55
56
57
58
59
FROM rocker/r-ubuntu:18.04
# fix texlive-xetex issues
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
# install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
sudo \
apt-utils \
gdebi-core \
pandoc \
pandoc-citeproc \
libcairo2-dev \
libxt-dev \
libssl-dev \
libcurl4-openssl-dev \
libxml2-dev \
fonts-roboto \
texlive-xetex \
texlive-generic-recommended \
texlive-latex-extra \
texlive-fonts-recommended \
lmodern \
ssh \
less
# install a more recent V8
RUN sudo add-apt-repository ppa:cran/v8 && \
sudo apt-get update && \
sudo apt-get install -y libnode-dev
# install some binary pacakges to reduce compilation time
RUN sudo apt-get install -y \
r-cran-tidyverse
# download and install shiny server
RUN wget --no-verbose "https://download3.rstudio.org/ubuntu-14.04/x86_64/shiny-server-1.5.12.933-amd64.deb" -O shiny-server.deb && \
gdebi -n shiny-server.deb && \
rm -f shiny-server.deb
# install R packages
COPY ./docker/packages.R /opt/packages.R
RUN Rscript /opt/packages.R
# copy shiny server config
COPY ./docker/shiny-server.conf /etc/shiny-server/shiny-server.conf
# copy app
COPY ./ /srv/shiny-server/
# make the app available at port 3838
EXPOSE 3838
# copy shiny server config scripts
COPY ./docker/shiny-server.sh /usr/bin/shiny-server.sh
# run shiny server
CMD ["/usr/bin/shiny-server.sh"]
RUN ["chmod", "+x", "/usr/bin/shiny-server.sh"]