-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile_anomanor
109 lines (95 loc) · 2.46 KB
/
Dockerfile_anomanor
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
FROM rocker/r-ver:latest
LABEL maintainer="[email protected]"
RUN apt-get update -qq && apt-get -y --no-install-recommends install \
libxml2-dev \
libcairo2-dev \
libsqlite3-dev \
libpq-dev \
libssh2-1-dev \
libcurl4-openssl-dev \
libssl-dev \
libmagick++-dev \
pandoc \
net-tools \
gsfonts \
iputils-ping \
libharfbuzz-dev \
libfribidi-dev \
curl
RUN install2.r --error --ncpus 4 --skipinstalled \
DBI \
DT \
R6 \
RSQLite \
Rcpp \
checkmate \
colorspace \
config \
corrplot \
digest \
dplyr \
flextable \
ggplot2 \
golem \
httr \
icr \
keys \
later \
lubridate \
magick \
markdown \
pingr \
png \
pool \
purrr \
ragg \
readr \
readxl \
remotes \
rprojroot \
scales \
shiny \
shinyWidgets \
shinyjs \
shinyvalidate \
stinepack \
stringr \
tidyr \
visNetwork \
withr \
xtable
RUN R -e 'remotes::install_github("JohnCoene/tippy")'
ARG R_CONFIG_ACTIVE
ARG ANOMANOR_DATA
ARG ANOMANOR_ADMIN_USERNAME
ARG ANOMANOR_ADMIN_PASSWORD
ARG ANOMANOR_SECRET
ARG DOCKER_ANOMANOR_STANDALONE
ENV ANOMANOR_DOCKER=${DOCKER_ANOMANOR_STANDALONE:-FALSE}
ENV DOCKER_ANOMANOR_STANDALONE=${DOCKER_ANOMANOR_STANDALONE}
ENV ANOMANOR_DATA=${ANOMANOR_DATA}
ENV R_CONFIG_ACTIVE=${R_CONFIG_ACTIVE}
ENV ANOMANOR_ADMIN_USERNAME=${ANOMANOR_ADMIN_USERNAME:-anomanor_admin}
ENV ANOMANOR_ADMIN_PASSWORD=${ANOMANOR_ADMIN_PASSWORD:-anomanor_admin}
ENV ANOMANOR_SECRET=${ANOMANOR_SECRET}
ENV TZ="Europe/Berlin"
RUN mkdir -p /root/anomanor
RUN mkdir -p ${ANOMANOR_DATA}/data
RUN mkdir -p ${ANOMANOR_DATA}/cache
RUN mkdir -p ${ANOMANOR_DATA}/db
RUN mkdir /build_zone
# The following line fails when RStudio IDE is active
ADD . /build_zone
WORKDIR /build_zone
RUN R CMD INSTALL --preclean --no-multiarch --with-keep.source .
RUN rm -rf /build_zone
COPY ./inst/config.yml /usr/local/lib/R/site-library/anomanor/
COPY ./inst/Renviron_production /usr/local/lib/R/site-library/anomanor/
COPY ./inst/Renviron_devel /usr/local/lib/R/site-library/anomanor/
HEALTHCHECK --start-period=20s --interval=1m --timeout=5s \
CMD curl -I --fail http://localhost:3838 || exit 1
EXPOSE 3838
CMD R -e "anomanor::run_app()"
# Debug
# https://stackoverflow.com/questions/43308319/how-can-i-run-bash-in-a-docker-container
# docker run -v /home/hrmconsensus/anomanor_data/anomanor:${ANOMANOR_DATA} --rm -it --entrypoint bash anomanor