-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (33 loc) · 844 Bytes
/
Dockerfile
File metadata and controls
40 lines (33 loc) · 844 Bytes
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
# Start with the official R base image
FROM rocker/shiny:latest
# Install system dependencies required for R packages
RUN apt-get update && apt-get install -y \
libcurl4-gnutls-dev \
libssl-dev \
libxml2-dev \
libgdal-dev \
libudunits2-dev \
libgeos-dev \
libproj-dev \
&& rm -rf /var/lib/apt/lists/*
# Install required R packages
RUN R -e "install.packages(c(\
'shiny', \
'shinyauthr', \
'bslib', \
'tidyverse', \
'tmap', \
'sf' \
), \
repos='https://cran.rstudio.com/')"
# Create app directory
RUN mkdir /app
# Copy app files into container
COPY app.R /app/
COPY data/ng_data.rds /app/data/
# Set working directory
WORKDIR /app
# Expose port 3838 (default Shiny port)
EXPOSE 3838
# Run the Shiny app
CMD ["R", "-e", "shiny::runApp('/app', host = '0.0.0.0', port = 3838)"]