Skip to content

Commit

Permalink
Create Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
eblondel authored Oct 8, 2021
1 parent 6ab8866 commit a40c22b
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
FROM rocker/r-ver:4.0.5

MAINTAINER Emmanuel Blondel "[email protected]"

# system libraries of general use

RUN apt-get update && apt-get install -y \
sudo \
libudunits2-dev \
libproj-dev \
libgeos-dev \
libgdal-dev \
libssl-dev \
libcurl4-openssl-dev \
libxml2-dev \
git

RUN apt-get update && apt-get upgrade -y

# install dependencies of the app

RUN R -e "install.packages(c('devtools'), repos='https://cran.r-project.org/')"
RUN R -e "install.packages(c('XML'), repos='https://cran.r-project.org/')"
RUN R -e "install.packages(c('shiny'), repos='https://cran.r-project.org/')"
RUN R -e "install.packages(c('shinyjs'), repos='https://cran.r-project.org/')"
RUN R -e "install.packages(c('shinydashboard'), repos='https://cran.r-project.org/')"
RUN R -e "install.packages(c('jsonlite'), repos='https://cran.r-project.org/')"
RUN R -e "install.packages(c('DT'), repos='https://cran.r-project.org/')"
RUN R -e "install.packages(c('tibble'), repos='https://cran.r-project.org/')"
RUN R -e "devtools::install_github('eblondel/ows4R')"
RUN R -e "devtools::install_github('eblondel/geonapi')"
RUN R -e "devtools::install_github('eblondel/geoflow')"

RUN git -C /root/ clone https://github.com/eblondel/geoflow-shiny.git && echo "OK!"
RUN mkdir -p /srv/shiny/
RUN ln -s /root/geoflow-shiny /srv/shiny/geoflow-shiny

EXPOSE 3838

RUN apt-get install -y curl
CMD ["R", "-e shiny::runApp('/srv/shiny/geoflow-shiny',port=3838,host='0.0.0.0')"]
#CMD ["R", "-e shiny::runApp('/srv/shiny/SdilabGenericPop')"]

0 comments on commit a40c22b

Please sign in to comment.