Spaces:
Running
Running
| # Use rocker/geospatial as the base image to include necessary geospatial libraries | |
| FROM rocker/geospatial:latest | |
| # Set the working directory inside the container | |
| WORKDIR /code | |
| # Install additional R packages required by the app | |
| RUN Rscript -e "install.packages(c('shiny', 'shinydashboard', 'leaflet', 'DT', 'RColorBrewer'), dependencies = c('Depends', 'Imports', 'LinkingTo'), repos = 'https://cran.r-project.org')" | |
| # Copy the current directory (containing app.R, wealth_map.tif, and poverty_improvement_by_state.csv) into the container | |
| COPY . . | |
| # Run the Shiny app, making it accessible externally on port 7860 | |
| CMD ["R", "--quiet", "-e", "shiny::runApp(host='0.0.0.0', port=7860)"] |