-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
48 lines (41 loc) · 1.15 KB
/
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
44
45
46
47
48
# Use the official rocker/shiny base image
FROM rocker/shiny:latest
# Set environment variables for Shiny
ENV SHINY_PORT=3838 \
CRAN_REPO=https://cloud.r-project.org \
_R_SHLIB_STRIP_=true \
SHINY_SERVER_VERSION=1.5.20.1002
# Install system dependencies
RUN apt-get update && apt-get install -y \
--no-install-recommends \
git-core \
libssl-dev \
libcurl4-gnutls-dev \
curl \
libsodium-dev \
libxml2-dev \
libicu-dev \
libgl1-mesa-dev \
libglu1-mesa \
libglfw3 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Install R dependencies
RUN install2.r --error --skipinstalled \
devtools \
R6 \
data.table \
dplyr \
echarts4r \
minpack.lm \
mgcv \
shiny \
DT \
bs4Dash \
readxl
RUN R -e "devtools::install_github('AdrianAntico/AutoNLS', upgrade = FALSE, dependencies = FALSE, force = TRUE)"
# CMD /bin/bash \
CMD ["R", "-e", "options(shiny.minServerVersion = '0.0.0', 'shiny.port'=3838, shiny.host='0.0.0.0'); library(AutoNLS); AutoNLS::run_shiny_app(launch_browser = FALSE)"]
EXPOSE 3838
# Optional: Add a health check
HEALTHCHECK CMD curl --fail http://localhost:3838 || exit 1