-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathDockerfile
More file actions
60 lines (50 loc) · 1.21 KB
/
Dockerfile
File metadata and controls
60 lines (50 loc) · 1.21 KB
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
60
FROM openanalytics/r-base
LABEL maintainer "FINEPRINT <jakob.gutschlhofer@wu.ac.at>"
# Install a few dependencies for packages
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libxml2-dev \
libcairo2-dev \
libsqlite3-dev \
libpq-dev \
libssl-dev \
libcurl4-openssl-dev \
libssh2-1-dev \
unixodbc-dev \
libgdal-dev \
libgeos-dev \
liblwgeom-dev \
libssl-dev \
libudunits2-dev \
&& install2.r --error \
devtools \
tidyverse \
DBI \
RPostgreSQL \
pool \
shiny \
shinyjs \
plotly \
sf \
httr \
lwgeom \
shinyWidgets \
mapedit
# Add shiny user
RUN groupadd shiny \
&& useradd --gid shiny --shell /bin/bash --create-home shiny
# copy the app to the image
RUN mkdir /home/shiny/mva
COPY /app /home/shiny/mva/
COPY /app/.Renviron /home/shiny/
# Make all app files readable
RUN chmod -R +r /home/shiny/mva/
# Some shiny app settings
COPY Rprofile.site /usr/lib/R/etc/
# Make shiny the owner of /home/shiny/ in order to be able to access .Renviron
RUN chown -R shiny.shiny /home/shiny/
# Now run everything as user shiny
USER shiny
EXPOSE 3838
CMD ["R", "-e", "setwd('/home/shiny/mva')"]
CMD ["R", "-e", "shiny::runApp('/home/shiny/mva')"]