FROM rocker/shiny-verse:latest # Set working directory inside the container WORKDIR /code # Install system dependencies for R packages RUN apt-get update && apt-get install -y \ libcurl4-openssl-dev \ libssl-dev \ libxml2-dev \ libgit2-dev \ libgdal-dev \ libgeos-dev \ libproj-dev \ libudunits2-dev \ libfontconfig1-dev \ libfreetype6-dev \ libpng-dev \ libtiff5-dev \ libjpeg-dev \ wget \ curl \ && rm -rf /var/lib/apt/lists/* # Install R packages from CRAN RUN R -e "install.packages(c('shiny', 'dplyr', 'leaflet', 'RColorBrewer', 'scales', 'lattice', 'plotly', 'bslib', 'shinydashboard', 'remotes'), repos='https://cloud.r-project.org')" # Install GitHub packages using remotes RUN R -e "remotes::install_github('briatte/ggnet')" RUN R -e "remotes::install_github('rspatial/terra')" # Copy the app code into the container COPY . . # Expose port 7860 for Shiny EXPOSE 7860 # Run the Shiny app CMD ["R", "--quiet", "-e", "shiny::runApp(host='0.0.0.0', port=7860)"]