-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
43 lines (31 loc) · 1019 Bytes
/
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
# Base image https://hub.docker.com/u/rocker/
FROM rocker/shiny:4.3.0
# system libraries of general use
## install debian packages
RUN apt-get update -qq \
&& apt-get -y --no-install-recommends install \
libmagick++-dev \
&& rm -rf /var/lib/apt/lists/*
# Remove shiny-server example apps
WORKDIR /srv/shiny-server
RUN rm -rf *
## update system libraries
RUN apt-get update && \
apt-get upgrade -y && \
apt-get clean
WORKDIR /srv/shiny-server/nw-app/
# 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::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 data/northwind.db ./data/
COPY --chown=shiny:shiny docker/shiny-server.conf /etc/shiny-server/
WORKDIR /srv/shiny-server/
USER shiny
# EXPOSE 3838
CMD ["/usr/bin/shiny-server"]