From 61b8e67447874bfa8d83d4e8e6ec537a5526f19e Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Thu, 26 May 2016 11:01:21 +0100 Subject: [PATCH] build latex first for faster images and compile clsi synctex --- server-ce/Dockerfile | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/server-ce/Dockerfile b/server-ce/Dockerfile index c7081288f4..7fd51f7e01 100644 --- a/server-ce/Dockerfile +++ b/server-ce/Dockerfile @@ -2,6 +2,15 @@ FROM phusion/baseimage:0.9.16 ENV baseDir . +# Install TexLive +RUN apt-get install -y wget +RUN wget http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz; \ + mkdir /install-tl-unx; \ + tar -xvf install-tl-unx.tar.gz -C /install-tl-unx --strip-components=1 + +RUN echo "selected_scheme scheme-basic" >> /install-tl-unx/texlive.profile; \ + /install-tl-unx/install-tl -profile /install-tl-unx/texlive.profile + # Install Node.js and Grunt RUN curl -sL https://deb.nodesource.com/setup | sudo bash - RUN apt-get install -y build-essential nodejs @@ -17,7 +26,6 @@ RUN adduser --system --group --home /var/www/sharelatex --no-create-home sharela chown sharelatex:sharelatex /var/lib/sharelatex/data/template_files; - # Install ShareLaTeX RUN apt-get install -y git python RUN git clone https://github.com/sharelatex/sharelatex.git /var/www/sharelatex @@ -44,6 +52,9 @@ RUN cd /var/www && node git-revision > revisions.txt RUN cd /var/www/sharelatex/web; \ grunt compile:minify; +RUN cd /var/www/sharelatex/clsi; \ + grunt compile:bin + # Install Nginx as a reverse proxy run apt-get update RUN apt-get install -y nginx; @@ -78,14 +89,8 @@ ADD ${baseDir}/runit/tags-sharelatex.sh /etc/service/tags-sharelatex ADD ${baseDir}/runit/track-changes-sharelatex.sh /etc/service/track-changes-sharelatex/run ADD ${baseDir}/runit/web-sharelatex.sh /etc/service/web-sharelatex/run -# Install TexLive -RUN apt-get install -y wget -RUN wget http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz; \ - mkdir /install-tl-unx; \ - tar -xvf install-tl-unx.tar.gz -C /install-tl-unx --strip-components=1 -RUN echo "selected_scheme scheme-basic" >> /install-tl-unx/texlive.profile; \ - /install-tl-unx/install-tl -profile /install-tl-unx/texlive.profile + RUN rm -r /install-tl-unx; \ rm install-tl-unx.tar.gz @@ -113,6 +118,8 @@ RUN mkdir /etc/sharelatex ADD ${baseDir}/settings.coffee /etc/sharelatex/settings.coffee ENV SHARELATEX_CONFIG /etc/sharelatex/settings.coffee + + EXPOSE 80 ENTRYPOINT ["/sbin/my_init"]