-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (25 loc) · 785 Bytes
/
Copy pathDockerfile
File metadata and controls
31 lines (25 loc) · 785 Bytes
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
FROM rocker/shiny:latest
ENV DEBIAN_FRONTEND=noninteractive
# Install system dependencies
RUN apt-get update -qq \
&& apt-get install --yes \
curl \
libgdal-dev \
libproj-dev \
libudunits2-dev \
&& rm -rf /var/lib/apt/lists/*
# Remove examples
WORKDIR /srv/shiny-server
RUN rm -rf *
# Install R dependencies
COPY --chown=shiny:shiny .Rprofile renv.lock ./
COPY --chown=shiny:shiny renv/activate.R renv/
RUN sudo -u shiny Rscript -e 'renv::snapshot(update = TRUE)'
RUN sudo -u shiny Rscript -e 'renv::restore(clean = TRUE)'
# Copy app
COPY --chown=shiny:shiny app.R ./
COPY --chown=shiny:shiny config.yml ./
COPY --chown=shiny:shiny rhino.yml ./
COPY --chown=shiny:shiny app app/
COPY --chown=shiny:shiny docker/shiny-server.conf /etc/shiny-server/
USER shiny