-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
66 lines (61 loc) · 2.75 KB
/
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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
FROM rocker/geospatial:4.1
WORKDIR /srv/shiny-server
# system libraries of general use
RUN apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends \
libsodium-dev \
# libmariadbclient-dev \
libudunits2-dev \
# libgdal-dev \
# libproj-dev \
vim \
curl \
git \
fonts-roboto \
ghostscript \
libssl-dev \
libxml2-dev \
gdebi-core \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/ \
## Upgrade shiny server
&& wget --no-verbose https://download3.rstudio.org/ubuntu-14.04/x86_64/VERSION -O "version.txt" \
&& VERSION=$(cat version.txt) \
&& wget https://download3.rstudio.org/ubuntu-14.04/x86_64/shiny-server-$VERSION-amd64.deb \
&& wget --no-verbose "https://download3.rstudio.org/ubuntu-14.04/x86_64/shiny-server-$VERSION-amd64.deb" -O ss-latest.deb \
&& gdebi -n ss-latest.deb \
&& rm -f version.txt ss-latest.deb \
&& install2.r --error tinytex \
## Admin-based install of TinyTeX:
&& wget -qO- \
"https://github.com/yihui/tinytex/raw/main/tools/install-unx.sh" | \
sh -s - --admin --no-path \
&& mv ~/.TinyTeX /opt/TinyTeX \
&& if /opt/TinyTeX/bin/*/tex -v | grep -q 'TeX Live 2018'; then \
## Patch the Perl modules in the frozen TeX Live 2018 snapshot with the newer
## version available for the installer in tlnet/tlpkg/TeXLive, to include the
## fix described in https://github.com/yihui/tinytex/issues/77#issuecomment-466584510
## as discussed in https://www.preining.info/blog/2019/09/tex-services-at-texlive-info/#comments
wget -P /tmp/ ${CTAN_REPO}/install-tl-unx.tar.gz \
&& tar -xzf /tmp/install-tl-unx.tar.gz -C /tmp/ \
&& cp -Tr /tmp/install-tl-*/tlpkg/TeXLive /opt/TinyTeX/tlpkg/TeXLive \
&& rm -r /tmp/install-tl-*; \
fi \
&& /opt/TinyTeX/bin/*/tlmgr path add \
&& tlmgr install ae colortbl environ fancyhdr fontaxes grfext inconsolata listings makecell metafont mfware multirow parskip pdfcrop pdflscape ragged2e roboto setspace tabu tex threeparttable threeparttablex trimspaces ulem varwidth wrapfig \
&& tlmgr path add \
&& Rscript -e "tinytex::r_texmf()" \
&& chown -R root:staff /opt/TinyTeX \
&& chmod -R g+w /opt/TinyTeX \
&& chmod -R g+wx /opt/TinyTeX/bin \
&& echo "PATH=${PATH}" >> /usr/local/lib/R/etc/Renviron \
&& install2.r --error PKI \
&& cd /tmp/ \
&& wget https://github.com/jgm/pandoc/releases/download/2.16.2/pandoc-2.16.2-1-amd64.deb \
&& DEB="/tmp/pandoc-2.16.2-1-amd64.deb" \
&& sudo dpkg -i $DEB \
&& rm -rf /srv/shiny-server/
COPY ./ /srv/shiny-server/
RUN R -e "install.packages('remotes', repos = c(CRAN = 'https://cloud.r-project.org'))" \
&& R -e "remotes::install_github('rstudio/renv@0.15.4')" \
&& R -e "setwd('/srv/shiny-server/'); renv::restore();"
EXPOSE 3838