- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
16 lines (11 loc) · 722 Bytes
/
Dockerfile
File metadata and controls
16 lines (11 loc) · 722 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
FROM rocker/tidyverse
# on build, copy application files
COPY . /app/
# for installing additional dependencies etc.
RUN if [ -f '/app/onbuild' ]; then bash /app/onbuild; fi;
# look for /app/apt-packages and if it exists, install the packages contained
RUN if [ -f '/app/apt-packages' ]; then apt-get update -q && cat apt-packages | xargs apt-get -qy install && rm -rf /var/lib/apt/lists/*; fi;
# look for /app/init.R and if it exists, execute it
RUN if [ -f '/app/init.R' ]; then /usr/local/bin/R --no-init-file --no-save --quiet --slave -f /app/init.R; fi;
# here app.R needs to match the name of the file which contains your app
CMD cd /app && /usr/local/bin/R --no-save -f /app/app.R