Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +9 -9
Dockerfile
CHANGED
|
@@ -1,14 +1,14 @@
|
|
| 1 |
-
|
|
|
|
| 2 |
|
|
|
|
| 3 |
WORKDIR /code
|
| 4 |
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
readr \
|
| 10 |
-
ggExtra
|
| 11 |
-
|
| 12 |
COPY . .
|
| 13 |
|
| 14 |
-
|
|
|
|
|
|
| 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 additional R packages required by the app
|
| 8 |
+
RUN Rscript -e "install.packages(c('shiny', 'shinydashboard', 'leaflet', 'DT', 'RColorBrewer'), dependencies = c('Depends', 'Imports', 'LinkingTo'), repos = 'https://cran.r-project.org')"
|
| 9 |
+
|
| 10 |
+
# Copy the current directory (containing app.R, wealth_map.tif, and poverty_improvement_by_state.csv) into the container
|
|
|
|
|
|
|
|
|
|
| 11 |
COPY . .
|
| 12 |
|
| 13 |
+
# Run the Shiny app, making it accessible externally on port 7860
|
| 14 |
+
CMD ["R", "--quiet", "-e", "shiny::runApp(host='0.0.0.0', port=7860)"]
|