TimStats commited on
Commit
34c9a28
·
verified ·
1 Parent(s): f687602

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -12
Dockerfile CHANGED
@@ -1,17 +1,26 @@
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
 
10
- # Install development packages from GitHub
11
- RUN installGithub.r \
12
- rstudio/bslib \
13
- rstudio/httpuv
 
14
 
15
- COPY . .
 
16
 
17
- CMD ["R", "--quiet", "-e", "shiny::runApp(host='0.0.0.0', port=7860)"]
 
 
 
 
 
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 files into the image
14
+ COPY app.R /srv/shiny-server/
15
+ COPY MLB24T.csv /srv/shiny-server/
16
+ COPY AAA24T.csv /srv/shiny-server/
17
+ COPY FSL24T.csv /srv/shiny-server/
18
 
19
+ # Make the app files readable
20
+ RUN chmod -R 755 /srv/shiny-server/
21
 
22
+ # Expose the application port
23
+ EXPOSE 3838
24
+
25
+ # Run the Shiny app
26
+ CMD ["/usr/bin/shiny-server"]