cjerzak commited on
Commit
c332469
·
verified ·
1 Parent(s): 44e2aef

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +19 -24
Dockerfile CHANGED
@@ -1,29 +1,24 @@
1
- FROM rocker/r-base:latest
2
-
3
- # Install system dependencies for R packages
4
- RUN apt-get update && apt-get install -y --no-install-recommends \
5
- libudunits2-dev \
6
- libgdal-dev \
7
- libgeos-dev \
8
- libproj-dev \
9
- && apt-get clean \
10
- && rm -rf /var/lib/apt/lists/*
11
 
12
  WORKDIR /code
13
 
14
- RUN install2.r --error \
15
- shiny \
16
- dplyr \
17
- ggplot2 \
18
- readr \
19
- DT \
20
- ggExtra \
21
- shinydashboard \
22
- sf \
23
- cartogram \
24
- rnaturalearth \
25
- rnaturalearthdata
26
-
 
 
27
  COPY . .
28
 
29
- CMD ["R", "--quiet", "-e", "shiny::runApp(host='0.0.0.0', port=7860)"]
 
 
1
+ # Use rocker/geospatial as the base image to include necessary geospatial libraries
2
+ FROM rocker/geospatial:latest
 
 
 
 
 
 
 
 
3
 
4
  WORKDIR /code
5
 
6
+ # Install R packages, specifying the CRAN repository for reliability
7
+ RUN install2.r --error --repos "https://cran.r-project.org" \
8
+ shiny \
9
+ dplyr \
10
+ ggplot2 \
11
+ readr \
12
+ DT \
13
+ ggExtra \
14
+ shinydashboard \
15
+ sf \
16
+ cartogram \
17
+ rnaturalearth \
18
+ rnaturalearthdata
19
+
20
+ # Copy the current directory into the container
21
  COPY . .
22
 
23
+ # Run the Shiny app
24
+ CMD ["R", "--quiet", "-e", "shiny::runApp(host='0.0.0.0', port=7860)"]