File size: 1,039 Bytes
71c468d
fa53cd1
eb6da70
fa53cd1
 
eb6da70
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fa53cd1
 
eb6da70
4fc9d7e
eb6da70
 
fa53cd1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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)"]