# 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 --deps TRUE --repos "https://cran.r-project.org" \ | |
shiny \ | |
shinydashboard \ | |
dplyr \ | |
readr \ | |
sf \ | |
cartogram \ | |
ggplot2 \ | |
rnaturalearth \ | |
rnaturalearthdata \ | |
countrycode \ | |
DT \ | |
ggExtra \ | |
viridis | |
# 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)"] |