Build as docker container
Change-Id: Ied30167fbaf02fb7744e6295168c8c450687a4c6
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..19f8a12
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,17 @@
+FROM rocker/tidyverse
+
+RUN apt-get update -qq && apt-get -y --no-install-recommends install \
+ libu2f-udev build-essential libglpk40 libcurl4-gnutls-dev libxml2-dev libsodium-dev libsecret-1-dev libfontconfig1-dev libssl-dev libxt6 libpq-dev
+
+COPY /shiny ./app
+
+RUN R -e "install.packages(c('devtools', 'shiny', 'shinythemes', 'highcharter'))"
+RUN R -e 'devtools::install_git("https://korap.ids-mannheim.de/gerrit/IDS-Mannheim/idsThemeR")'
+RUN R -e 'devtools::install_git("https://korap.ids-mannheim.de/gerrit/KorAP/RKorAPClient")'
+RUN echo "Populating cache"
+ENV R_CACHE_ROOTPATH=/cache
+RUN mkdir ${R_CACHE_ROOTPATH}
+RUN R -e 'input=list(cq=";referTo ratskorpus-2023-1;referTo drukola.20180909.1b_words"); source("/app/app.R"); renderHighchart<-function(x) { eval(x) }; server(input,"","");'
+
+EXPOSE 3838
+CMD ["R", "-e", "shiny::runApp('/app', host = '0.0.0.0', port = 3838)"]