Spaces:
Sleeping
Sleeping
| FROM rocker/shiny:latest | |
| WORKDIR /code | |
| # Minimal system deps for headless Chromium (webshot2) + TLS | |
| RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ | |
| chromium \ | |
| libnss3 \ | |
| libgbm1 \ | |
| libx11-6 \ | |
| libxrender1 \ | |
| libxext6 \ | |
| libgtk-3-0 \ | |
| fonts-liberation \ | |
| fonts-dejavu \ | |
| ca-certificates \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Let webshot2/chromote find Chromium and use safe flags in containers | |
| ENV CHROME_BIN=/usr/bin/chromium | |
| ENV CHROMOTE_CHROME=/usr/bin/chromium | |
| ENV CHROMOTE_CHROME_ARGS="--no-sandbox --disable-dev-shm-usage" | |
| # R packages used by this app | |
| RUN install2.r --error --skipinstalled \ | |
| shiny \ | |
| shinydashboard \ | |
| DT \ | |
| dplyr \ | |
| shinyjs \ | |
| readr \ | |
| webshot2 \ | |
| htmlwidgets \ | |
| ggplot2 | |
| # App code | |
| COPY . /code | |
| # Serve on 7860 to match your runApp call | |
| EXPOSE 7860 | |
| # Run app (respects $PORT if set by the platform) | |
| CMD ["R", "--quiet", "-e", "options(shiny.port=as.integer(Sys.getenv('PORT', 7860)), shiny.host='0.0.0.0'); shiny::runApp('/code')"] |