forked from benmarwick/huskydown
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
24 lines (17 loc) · 839 Bytes
/
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
# get the base image
FROM rocker/verse:3.4.4
# required
MAINTAINER Emrah Er <eer@eremrah.com>
# get contents of GitHub repo
COPY . /wildcatdown
# go into the repo directory
RUN . /etc/environment \
&& sudo apt-get update \
&& sudo unzip wildcatdown/fonts.zip && cp fonts -r /usr/local/share/fonts \
&& sudo fc-cache -f -v \
&& R -e "devtools::install('/wildcatdown', dep=TRUE)" \
&& R -e "if (dir.exists('index')) unlink('index', recursive = TRUE)" \
&& R -e "rmarkdown::draft('index.Rmd', template = 'thesis', package = 'wildcatdown', create_dir = TRUE, edit = FALSE)" \
&& R -e "if (file.exists('index/_book/thesis.pdf')) file.remove('index/_book/thesis.pdf')" \
&& R -e "setwd('index'); bookdown::render_book('index.Rmd', wildcatdown::thesis_pdf(latex_engine = 'xelatex'))" \
&& R -e "file.exists('index/_book/thesis.pdf')"