Skip to content

Commit 6f649bc

Browse files
Update Dockerfile
1 parent 6390e9f commit 6f649bc

1 file changed

Lines changed: 15 additions & 6 deletions

File tree

Dockerfile

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
1-
FROM rocker/shiny:4.2.1
2-
RUN install2.r rsconnect htmltools bslib mapgl shiny shinythemes
3-
WORKDIR /home/mapthegap
4-
COPY app.R app.R
5-
COPY deploy.R deploy.R
6-
CMD Rscript deploy.R
1+
# Base R Shiny image
2+
FROM rocker/geospatial
3+
4+
# Make a directory in the container
5+
RUN mkdir /home/mapthegap
6+
7+
# Install R dependencies
8+
RUN R -e "install.packages(c('pak')); \
9+
pak::pak(c('mapgl'))"
10+
11+
# Copy the Shiny app code
12+
COPY app.R /home/mapthegap/app.R
13+
14+
# Run the R Shiny app
15+
CMD ["R", "-e", "library(shiny); setwd('/home/mapthegap/'); addResourcePath('www', '/home/mapthegap/www'); source('app.R')"]

0 commit comments

Comments
 (0)