File size: 770 Bytes
c332469 44e2aef 9bc5dc1 0dbfc34 9bc5dc1 f3b3aee c332469 9bc5dc1 0dbfc34 e505df7 9bc5dc1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
# 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 required R packages, excluding suggested dependencies to avoid rnaturalearthhires error
RUN Rscript -e "install.packages(c('shiny', 'shinydashboard', 'dplyr', 'readr', 'sf', 'cartogram', 'ggplot2', 'rnaturalearth', 'rnaturalearthdata', 'countrycode', 'DT', 'ggExtra', 'viridis','ggiraph','extrafont','leaflet'), dependencies = c('Depends', 'Imports', 'LinkingTo'), repos = 'https://cran.r-project.org')"
# Copy the current directory (containing app.R and data) into the container
COPY . .
# Run the Shiny app
CMD ["R", "--quiet", "-e", "shiny::runApp(host='0.0.0.0', port=7860)"] |