-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.shiny
More file actions
58 lines (47 loc) · 1.3 KB
/
Dockerfile.shiny
File metadata and controls
58 lines (47 loc) · 1.3 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
# https://hosting.analythium.io/running-shiny-server-in-docker/
# Adapted to host TIGA, https://github.com/unmtransinfo/TIGA
FROM rocker/shiny:4.4.2
# Install system requirements as needed for R, Shiny, TIGA.
RUN apt update
#RUN apt install -y --no-install-recommends \
RUN apt install -y \
git-core \
libssl-dev \
libcurl4-gnutls-dev \
curl \
libsodium-dev \
libxml2-dev \
libicu-dev \
build-essential
#
#
RUN apt clean
# RUN rm -rf /var/lib/apt/lists/*
ENV _R_SHLIB_STRIP_=true
#RUN install2.r --error --skipinstalled \
# readr \
# data.table \
# DT \
# shiny \
# shinyBS \
# htmltools \
# devtools \
# plotly
RUN R -e 'install.packages(c("readr", "data.table", "DT"))'
RUN R -e 'install.packages(c("shiny", "shinyBS", "htmltools"))'
RUN R -e 'install.packages(c("devtools", "plotly"))'
RUN R -e 'devtools::install_github("AnalytixWare/ShinySky")'
# Not working -- WHY? Probably libglpk-dev dependency.
RUN apt update
RUN apt install -y libglpk-dev
RUN R -e 'install.packages("igraph")'
# This works:
# docker exec -u root CID R -e 'install.packages("igraph")'
# Copy local app files into container. # Not working -- WHY?
COPY ./R/tiga/ /srv/shiny-server/
# But this works:
# docker cp ./R/tiga/ CID:/srv/shiny-server/
RUN ls -R /srv/shiny-server/tiga/
USER shiny
EXPOSE 3838
CMD ["/usr/bin/shiny-server"]