Update Dockerfile
Browse files- Dockerfile +19 -24
Dockerfile
CHANGED
|
@@ -1,29 +1,24 @@
|
|
| 1 |
-
|
| 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 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
|
|
|
|
|
|
| 27 |
COPY . .
|
| 28 |
|
| 29 |
-
|
|
|
|
|
|
| 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)"]
|