cjerzak commited on
Commit
0f9616e
·
verified ·
1 Parent(s): 1551a7f

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -3
Dockerfile CHANGED
@@ -1,9 +1,10 @@
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 --deps TRUE --repos "https://cran.r-project.org" \
8
  shiny \
9
  shinydashboard \
@@ -19,8 +20,11 @@ RUN install2.r --error --deps TRUE --repos "https://cran.r-project.org" \
19
  ggExtra \
20
  viridis
21
 
22
- # Copy the current directory into the container
23
  COPY . .
24
 
25
- # Run the Shiny app
 
 
 
26
  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
+ # Set the working directory inside the container
5
  WORKDIR /code
6
 
7
+ # Install required R packages, ensuring dependencies are included
8
  RUN install2.r --error --deps TRUE --repos "https://cran.r-project.org" \
9
  shiny \
10
  shinydashboard \
 
20
  ggExtra \
21
  viridis
22
 
23
+ # Copy all files from the current directory to the container's working directory
24
  COPY . .
25
 
26
+ # Expose port 7860 to allow external access to the Shiny app
27
+ EXPOSE 7860
28
+
29
+ # Command to run the Shiny app when the container starts
30
  CMD ["R", "--quiet", "-e", "shiny::runApp(host='0.0.0.0', port=7860)"]