-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
25 lines (17 loc) · 876 Bytes
/
Dockerfile
File metadata and controls
25 lines (17 loc) · 876 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
FROM rocker/shiny:4.4.0
RUN apt-get update && apt-get install -y --no-install-recommends \
libcurl4-openssl-dev \
libssl-dev \
libxml2-dev \
git \
&& rm -rf /var/lib/apt/lists/*
RUN R -e "install.packages(c('dplyr', 'bslib', 'fontawesome', 'crosstalk', 'remotes'), repos = 'https://cloud.r-project.org')"
# Install myIO from local source (not GitHub) so Docker always uses the current commit
COPY . /tmp/myIO
RUN R -e "remotes::install_local('/tmp/myIO')" && rm -rf /tmp/myIO
COPY app/ /srv/shiny-server/
RUN rm -rf /srv/shiny-server/sample-apps /srv/shiny-server/index.html
# Verify app parses without error
RUN R -e "library(shiny); library(bslib); library(dplyr); library(crosstalk); library(myIO); parse('/srv/shiny-server/app.R'); cat('All OK\n')"
EXPOSE 3838
CMD ["R", "-e", "shiny::runApp('/srv/shiny-server', host = '0.0.0.0', port = 3838)"]