Update Dockerfile
Browse files- Dockerfile +7 -8
Dockerfile
CHANGED
@@ -1,17 +1,16 @@
|
|
1 |
# Use rocker/geospatial as the base image to include necessary geospatial libraries
|
2 |
FROM rocker/geospatial:latest
|
3 |
|
4 |
-
# Set the working directory inside the container
|
5 |
WORKDIR /code
|
6 |
|
7 |
-
# Install
|
8 |
-
|
9 |
-
RUN install2.r --error --deps TRUE --repos "https://cran.r-project.org" \
|
10 |
shiny \
|
11 |
shinydashboard \
|
12 |
dplyr \
|
13 |
readr \
|
14 |
sf \
|
|
|
15 |
ggplot2 \
|
16 |
rnaturalearth \
|
17 |
rnaturalearthdata \
|
@@ -20,11 +19,11 @@ RUN install2.r --error --deps TRUE --repos "https://cran.r-project.org" \
|
|
20 |
ggExtra \
|
21 |
viridis
|
22 |
|
23 |
-
# Copy
|
24 |
COPY . .
|
25 |
|
26 |
-
# Expose port
|
27 |
EXPOSE 7860
|
28 |
|
29 |
-
#
|
30 |
-
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 but limit dependencies to required ones (skipping suggested packages like rnaturalearthhires)
|
7 |
+
RUN install2.r --error --deps 'Depends,Imports,LinkingTo' --repos "https://cran.r-project.org" \
|
|
|
8 |
shiny \
|
9 |
shinydashboard \
|
10 |
dplyr \
|
11 |
readr \
|
12 |
sf \
|
13 |
+
cartogram \
|
14 |
ggplot2 \
|
15 |
rnaturalearth \
|
16 |
rnaturalearthdata \
|
|
|
19 |
ggExtra \
|
20 |
viridis
|
21 |
|
22 |
+
# Copy the application code into the container
|
23 |
COPY . .
|
24 |
|
25 |
+
# Expose the port that Shiny will run on
|
26 |
EXPOSE 7860
|
27 |
|
28 |
+
# Run the Shiny app
|
29 |
+
CMD ["R", "--quiet", "-e", "shiny::runApp(host='0.0.0.0', port=7860)"]
|