-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile
More file actions
19 lines (13 loc) · 833 Bytes
/
Copy pathDockerfile
File metadata and controls
19 lines (13 loc) · 833 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File adapted from Heroku/Dashr demonstration repo by Joel Ostblom (https://github.com/UBC-MDS/dashr-heroku-deployment-demo)
#
FROM plotly/heroku-docker-r:3.6.3_heroku18
# 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/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/bin/R --no-save -f /app/src/app.R