Last active
June 9, 2020 17:20
-
-
Save mokztk/ffb7e698265eba50eca79663c7544e2a to your computer and use it in GitHub Desktop.
rocker/tidyverse:3.6.3 をベースに日本語フォントや頻用パッケージを追加する
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# R 3.6.3 and RStudio server with some packages. | |
FROM rocker/tidyverse:3.6.3 | |
# Change environment to Japanese (Character and DateTime) | |
# Ref: Dockerfile of rockerjp/tidyverse | |
ENV LANG=ja_JP.UTF-8 \ | |
LC_ALL=ja_JP.UTF-8 | |
RUN set -x \ | |
&& sed -i '$d' /etc/locale.gen \ | |
&& echo "ja_JP.UTF-8 UTF-8" >> /etc/locale.gen \ | |
&& locale-gen ja_JP.UTF-8 \ | |
&& /usr/sbin/update-locale LANG=ja_JP.UTF-8 LANGUAGE="ja_JP:ja" \ | |
&& /bin/bash -c "source /etc/default/locale" \ | |
&& ln -sf /usr/share/zoneinfo/Asia/Tokyo /etc/localtime | |
# Install Japanese fonts (Noto Sans CJK JP - Regular) | |
RUN set -x \ | |
&& wget -q https://noto-website-2.storage.googleapis.com/pkgs/NotoSansCJKjp-hinted.zip \ | |
&& unzip NotoSansCJKjp-hinted.zip NotoSansCJKjp-Regular.otf \ | |
&& mv NotoSansCJKjp-Regular.otf /usr/share/fonts/type1/ \ | |
&& chmod 644 /usr/share/fonts/type1/NotoSansCJKjp-Regular.otf \ | |
&& fc-cache -fv \ | |
&& rm NotoSansCJKjp-hinted.zip | |
# Install ssh client and required libraries | |
RUN set -x \ | |
&& apt-get update -qq \ | |
&& apt-get install -y --no-install-recommends \ | |
graphviz \ | |
libgraphviz-dev \ | |
libglu1-mesa-dev \ | |
libzmq3-dev \ | |
ssh \ | |
librsvg2-dev \ | |
libmagick++-dev \ | |
&& apt-get clean \ | |
&& rm -rf /var/lib/apt/lists/* | |
# Install R packages | |
RUN set -x \ | |
&& Rscript -e "BiocManager::install(c('graph', 'Rgraphviz'))" \ | |
&& install2.r --error --deps TRUE --ncpus -1 --skipinstalled \ | |
pacman \ | |
pROC \ | |
cmprsk \ | |
psych \ | |
clinfun \ | |
car \ | |
tableone \ | |
ggfortify \ | |
ggsci \ | |
tidylog \ | |
furrr \ | |
# export \ | |
# package "export" was removed from CRAN on 2020-02-21 | |
# install dev version from GitHub repo | |
officer \ | |
rvg \ | |
openxlsx \ | |
flextable \ | |
xtable\ | |
rgl \ | |
stargazer \ | |
tikzDevice \ | |
xml2 \ | |
&& installGithub.r tomwenseleers/export | |
# start RStudio Server | |
CMD ["/init"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment