TimStats commited on
Commit
9656f90
·
verified ·
1 Parent(s): 6c9ce3c

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +25 -18
Dockerfile CHANGED
@@ -1,23 +1,30 @@
1
- # Use the rocker/shiny base image
2
- FROM rocker/shiny:latest
3
 
4
- # Install system dependencies
5
- RUN apt-get update && apt-get install -y \
6
- libcurl4-gnutls-dev \
7
- libssl-dev \
8
- libxml2-dev
9
 
10
- # Install R packages
11
- RUN R -e "install.packages(c('shiny', 'shinydashboard', 'shinyWidgets', 'ggplot2', 'MASS', 'viridis', 'dplyr', 'httr', 'patchwork'), repos='http://cran.rstudio.com/')"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
 
13
- # Copy the app file into the image
14
- COPY app.R /srv/shiny-server/
 
 
15
 
16
- # Make the app file readable
17
- RUN chmod -R 755 /srv/shiny-server/
18
 
19
- # Expose the application port
20
- EXPOSE 3838
21
-
22
- # Run the Shiny app
23
- CMD ["/usr/bin/shiny-server"]
 
1
+ FROM rocker/shiny-verse:latest
 
2
 
3
+ WORKDIR /code
 
 
 
 
4
 
5
+ # Install stable packages from CRAN
6
+ RUN install2.r --error \
7
+ ggExtra \
8
+ shiny \
9
+ shinydashboard \
10
+ shinyWidgets \
11
+ baseballr \
12
+ plotly \
13
+ DT \
14
+ dplyr \
15
+ ggplot2 \
16
+ xgboost \
17
+ httr \
18
+ rsconnect \
19
+ MASS \
20
+ viridis \
21
+ patchwork
22
 
23
+ # Install development packages from GitHub
24
+ RUN installGithub.r \
25
+ rstudio/bslib \
26
+ rstudio/httpuv
27
 
28
+ COPY . .
 
29
 
30
+ CMD ["R", "--quiet", "-e", "shiny::runApp(host='0.0.0.0', port=7860)"]