Permalink
Switch branches/tags
Nothing to show
Find file Copy path
8452604 Nov 13, 2018
1 contributor

Users who have contributed to this file

88 lines (78 sloc) 2.68 KB
FROM shrektan/rdocker4ci:latest
MAINTAINER Shrek Tan "shrektan@126.com"
# The following code to install tinytex is copied from rocker/verse
# see https://github.com/rocker-org/rocker-versioned/blob/master/verse/Dockerfile
## Add LaTeX, rticles and bookdown support
## uses dummy texlive, see FAQ 8: https://yihui.name/tinytex/faq/
RUN wget "https://travis-bin.yihui.name/texlive-local.deb" \
&& dpkg -i texlive-local.deb \
&& rm texlive-local.deb \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
## for rJava
default-jdk \
## Nice Google fonts
fonts-roboto \
## used by some base R plots
ghostscript \
## used to build rJava and other packages
libbz2-dev \
libicu-dev \
liblzma-dev \
## system dependency of hunspell (devtools)
libhunspell-dev \
## system dependency of hadley/pkgdown
libmagick++-dev \
## rdf, for redland / linked data
librdf0-dev \
## for V8-based javascript wrappers
libv8-dev \
## for jq queries
libjq-dev \
## R CMD Check wants qpdf to check pdf sizes, or throws a Warning
qpdf \
## For building PDF manuals
texinfo \
## for git via ssh key
ssh \
## just because
less \
vim \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/ \
## Use tinytex for LaTeX installation
&& wget -qO- \
"https://github.com/yihui/tinytex/raw/master/tools/install-unx.sh" | \
sh -s - --admin --no-path \
&& mv ~/.TinyTeX /opt/TinyTeX \
&& /opt/TinyTeX/bin/*/tlmgr path add \
&& tlmgr install metafont mfware inconsolata tex ae parskip listings \
&& tlmgr path add \
&& Rscript -e "source('https://install-github.me/yihui/tinytex'); tinytex::r_texmf()" \
&& chown -R root:staff /opt/TinyTeX \
&& chmod -R g+w /opt/TinyTeX \
&& chmod -R g+wx /opt/TinyTeX/bin \
## And some nice R packages for publishing-related stuff
&& install2.r --error --deps TRUE \
bookdown rticles rmdshower DT
# Install Database related apt
RUN apt-get update && apt-get install -y --no-install-recommends \
libaio1 \
unixodbc \
unixodbc-dev \
tdsodbc
# register Free TDS driver
COPY tds.driver.template /var/tds.driver.template
RUN odbcinst -i -d -f /var/tds.driver.template
# Shrek's own working environment
COPY install_pkgs.R /usr/bin/install_pkgs.R
RUN Rscript -e "source('/usr/bin/install_pkgs.R')"
# Github version packages
# RUN Rscript -e " \
# message('install pkgs from github...'); \
# below packages are not on CRAN better not use
# devtools::install_github('shrektan/RSQLServer'); \
# devtools::install_github('Ather-Energy/ggTimeSeries'); \
# devtools::install_github('ricardo-bion/ggradar'); \
# devtools::install_github('trestletech/shinyStore'); \
# "