cjerzak commited on
Commit
9751eae
·
verified ·
1 Parent(s): 1be2f5f

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -9
Dockerfile CHANGED
@@ -1,14 +1,14 @@
1
- FROM rocker/r-base:latest
 
2
 
 
3
  WORKDIR /code
4
 
5
- RUN install2.r --error \
6
- shiny \
7
- dplyr \
8
- ggplot2 \
9
- readr \
10
- ggExtra
11
-
12
  COPY . .
13
 
14
- CMD ["R", "--quiet", "-e", "shiny::runApp(host='0.0.0.0', port=7860)"]
 
 
1
+ # Use rocker/geospatial as the base image to include necessary geospatial libraries
2
+ FROM rocker/geospatial:latest
3
 
4
+ # Set the working directory inside the container
5
  WORKDIR /code
6
 
7
+ # Install additional R packages required by the app
8
+ RUN Rscript -e "install.packages(c('shiny', 'shinydashboard', 'leaflet', 'DT', 'RColorBrewer'), dependencies = c('Depends', 'Imports', 'LinkingTo'), repos = 'https://cran.r-project.org')"
9
+
10
+ # Copy the current directory (containing app.R, wealth_map.tif, and poverty_improvement_by_state.csv) into the container
 
 
 
11
  COPY . .
12
 
13
+ # Run the Shiny app, making it accessible externally on port 7860
14
+ CMD ["R", "--quiet", "-e", "shiny::runApp(host='0.0.0.0', port=7860)"]