build latex first for faster images and compile clsi synctex

This commit is contained in:
Henry Oswald 2016-05-26 11:01:21 +01:00
parent 2f294daa99
commit 61b8e67447

View file

@ -2,6 +2,15 @@ FROM phusion/baseimage:0.9.16
ENV baseDir . 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 # Install Node.js and Grunt
RUN curl -sL https://deb.nodesource.com/setup | sudo bash - RUN curl -sL https://deb.nodesource.com/setup | sudo bash -
RUN apt-get install -y build-essential nodejs 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; chown sharelatex:sharelatex /var/lib/sharelatex/data/template_files;
# Install ShareLaTeX # Install ShareLaTeX
RUN apt-get install -y git python RUN apt-get install -y git python
RUN git clone https://github.com/sharelatex/sharelatex.git /var/www/sharelatex 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; \ RUN cd /var/www/sharelatex/web; \
grunt compile:minify; grunt compile:minify;
RUN cd /var/www/sharelatex/clsi; \
grunt compile:bin
# Install Nginx as a reverse proxy # Install Nginx as a reverse proxy
run apt-get update run apt-get update
RUN apt-get install -y nginx; 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/track-changes-sharelatex.sh /etc/service/track-changes-sharelatex/run
ADD ${baseDir}/runit/web-sharelatex.sh /etc/service/web-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; \ RUN rm -r /install-tl-unx; \
rm install-tl-unx.tar.gz rm install-tl-unx.tar.gz
@ -113,6 +118,8 @@ RUN mkdir /etc/sharelatex
ADD ${baseDir}/settings.coffee /etc/sharelatex/settings.coffee ADD ${baseDir}/settings.coffee /etc/sharelatex/settings.coffee
ENV SHARELATEX_CONFIG /etc/sharelatex/settings.coffee ENV SHARELATEX_CONFIG /etc/sharelatex/settings.coffee
EXPOSE 80 EXPOSE 80
ENTRYPOINT ["/sbin/my_init"] ENTRYPOINT ["/sbin/my_init"]