-
Notifications
You must be signed in to change notification settings - Fork 15
/
Dockerfile
47 lines (39 loc) · 1.62 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
FROM docker-registry.default.svc:5000/cscfi/tidyverse:4.1.3
COPY ./start.sh .
RUN chmod +x start.sh
# Setup various variables
ENV TZ="Europe/Helsinki" \
HOME="/mnt/${NAME}-pvc" \
TINI_VERSION=v0.18.0 \
APP_UID=999 \
APP_GID=999 \
PKG_R_VERSION=4.0.2 \
PKG_RSTUDIO_VERSION=1.1.447 \
PKG_SHINY_VERSION=1.5.7.907
RUN apt-get -y update
RUN apt-get install -y libnss-wrapper gettext vim strace
RUN apt-get install -y libudunits2-dev libgdal-dev libgeos-dev libproj-dev
# rstudio needs write permissions to sqlite
RUN chgrp -R 0 /var/lib/rstudio-server/ && \
chmod -R g=u /var/lib/rstudio-server/ && \
chown .root -R /home && \
chmod g+w -R /home && \
echo 'r-libs-user=~/R/library' >>/etc/rstudio/rsession.conf && \
echo "R_LIBS=\${R_LIBS-'/home/rstudio-server/R/library'}" >/usr/local/lib/R/etc/Renviron.site
######
ENV PKG_SHINY_VERSION=1.5.7.907
ADD https://download3.rstudio.org/ubuntu-14.04/x86_64/shiny-server-${PKG_SHINY_VERSION}-amd64.deb /tmp/shiny.deb
RUN dpkg -i /tmp/shiny.deb && \
install2.r -e shiny rmarkdown shinythemes shinydashboard && \
mv /srv/shiny-server/ /srv/shiny-server.old/ && \
mkdir -p /srv/shiny-server/ && \
mkdir -p /var/log/shiny-server && \
chown rstudio.rstudio /var/log/shiny-server && \
chmod go+w -R /var/log/shiny-server /usr/local/lib/R /srv /var/lib/shiny-server &&\
mkdir -p /var/log/rstudio-server &&\
chown rstudio.rstudio /var/log/rstudio-server &&\
chmod go+w /var/log/rstudio-server
COPY shiny-server.conf /etc/shiny-server/
###
ENTRYPOINT ["/start.sh"]
CMD ["/usr/lib/rstudio-server/bin/rserver", "--server-daemonize", "0"]