| # Use rocker/geospatial as the base image to include necessary geospatial libraries | |
| FROM rocker/geospatial:latest | |
| WORKDIR /code | |
| # Install R packages, specifying the CRAN repository for reliability | |
| RUN install2.r --error --repos "https://cran.r-project.org" \ | |
| shiny \ | |
| dplyr \ | |
| ggplot2 \ | |
| readr \ | |
| DT \ | |
| ggExtra \ | |
| shinydashboard \ | |
| sf \ | |
| cartogram \ | |
| countrycode \ | |
| rnaturalearth \ | |
| rnaturalearthdata | |
| # Copy the current directory into the container | |
| COPY . . | |
| # Run the Shiny app | |
| CMD ["R", "--quiet", "-e", "shiny::runApp(host='0.0.0.0', port=7860)"] |