forked from UBC-MDS/gapminder_challenge-R
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
21 lines (14 loc) · 956 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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;
# You could install packages here, but I strongly reccomend that you use init.R instead.
# RUN R -e "install.packages('remotes', repos='http://cran.rstudio.com/')" \
# && R -e "remotes::install_github('facultyai/dash-bootstrap-components@r-release')"
# 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/app.R