-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathDockerfile
108 lines (93 loc) · 2.73 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
FROM rocker/shiny:4.3.0
LABEL org.opencontainers.image.title="geoflow-shiny"
LABEL org.opencontainers.image.url="https://github.com/r-geoflow/geoflow-shiny"
LABEL org.opencontainers.image.source="https://github.com/r-geoflow/geoflow-shiny"
LABEL org.opencontainers.image.description="A shiny app to configure and run geoflows"
LABEL org.opencontainers.image.authors="Emmanuel Blondel <[email protected]>"
# system libraries for LaTeX reporting & keyring
RUN apt-get update && apt-get install -y \
sudo \
pandoc \
pandoc-citeproc \
texlive-xetex \
texlive-latex-base \
texlive-latex-recommended \
texlive-fonts-recommended \
texlive-fonts-extra \
texlive-formats-extra \
libssl-dev \
libxml2-dev \
libv8-dev \
libsodium-dev \
libsecret-1-dev \
librdf0 \
librdf0-dev
# general system libraries
# Note: this includes rdf/redland system libraries
RUN apt-get update && apt-get install -y \
cmake \
curl \
default-jdk \
fonts-roboto \
ghostscript \
hugo \
less \
libbz2-dev \
libglpk-dev \
libgmp3-dev \
libfribidi-dev \
libharfbuzz-dev \
libhunspell-dev \
libicu-dev \
liblzma-dev \
libmagick++-dev \
libopenmpi-dev \
libpcre2-dev \
libssl-dev \
libv8-dev \
libxml2-dev \
libxslt1-dev \
libzmq3-dev \
lsb-release \
qpdf \
texinfo \
software-properties-common \
vim \
wget
RUN install2.r --error --skipinstalled --ncpus -1 redland
RUN apt-get install -y \
libcurl4 \
libgit2-dev \
libxslt-dev \
librdf0 \
redland-utils \
rasqal-utils \
raptor2-utils
#geospatial libraries install
RUN /rocker_scripts/install_geospatial.sh
# install R core package dependencies
RUN install2.r --error --skipinstalled --ncpus -1 httpuv
#working directory
WORKDIR /srv/geoflow-shiny
# Set environment variables for renv cache, see doc https://docs.docker.com/build/cache/backends/
ARG RENV_PATHS_ROOT
# Make a directory in the container
RUN mkdir -p ${RENV_PATHS_ROOT}
#copy renv configuration
RUN R -e "install.packages(c('renv'), repos='https://cran.r-project.org/')"
COPY renv.lock renv.lock
COPY .Rprofile .Rprofile
COPY renv/activate.R renv/activate.R
COPY renv/settings.json renv/settings.json
# Set renv cache location: change default location of cache to project folder
# see documentation for Multi-stage builds => https://cran.r-project.org/web/packages/renv/vignettes/docker.html
RUN mkdir renv/.cache
ENV RENV_PATHS_CACHE=renv/.cache
# Restore the R environment
RUN R -e "renv::restore()"
#copy app
COPY . /srv/geoflow-shiny
#etc dirs (for config)
RUN mkdir -p /etc/geoflow-shiny/
EXPOSE 3838
CMD ["R", "-e shiny::runApp('/srv/geoflow-shiny',port=3838,host='0.0.0.0')"]