This repository has been archived by the owner on Sep 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from christianreiss/master
Near complete rework of the Dockerfile.
- Loading branch information
Showing
4 changed files
with
67 additions
and
19 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,52 @@ | ||
FROM phusion/baseimage:latest | ||
RUN apt-get update | ||
RUN apt-get install -y aspell-* | ||
RUN apt-get install -y --force-yes npm git mongodb-server redis-server wget sudo time netcat | ||
# We will stick to the official Dockerfile & Version | ||
FROM phusion/baseimage:0.9.16 | ||
|
||
RUN ln -s /usr/bin/nodejs /usr/bin/node | ||
# Update the System | ||
RUN apt update | ||
RUN apt upgrade -y | ||
|
||
RUN git clone https://github.com/scottkosty/install-tl-ubuntu.git; \ | ||
cd install-tl-ubuntu; \ | ||
./install-tl-ubuntu | ||
# Install Node and required packages. | ||
RUN /usr/bin/curl -sL https://deb.nodesource.com/setup_6.x | sudo bash - | ||
RUN apt-get install -y build-essential wget nodejs unzip time imagemagick optipng strace nginx git python zlib1g-dev libpcre3-dev aspell aspell-en aspell-af aspell-am aspell-ar aspell-ar-large aspell-bg aspell-bn aspell-br aspell-ca aspell-cs aspell-cy aspell-da aspell-de aspell-de-alt aspell-el aspell-eo aspell-es aspell-et aspell-eu-es aspell-fa aspell-fo aspell-fr aspell-ga aspell-gl-minimos aspell-gu aspell-he aspell-hi aspell-hr aspell-hsb aspell-hu aspell-hy aspell-id aspell-is aspell-it aspell-kk aspell-kn aspell-ku aspell-lt aspell-lv aspell-ml aspell-mr aspell-nl aspell-no aspell-nr aspell-ns aspell-or aspell-pa aspell-pl aspell-pt-br aspell-ro aspell-ru aspell-sk aspell-sl aspell-ss aspell-st aspell-sv aspell-ta aspell-te aspell-tl aspell-tn aspell-ts aspell-uk aspell-uz aspell-xh aspell-zu redis-server mongodb-server | ||
|
||
RUN git clone -b v0.2.0 --single-branch https://github.com/sharelatex/sharelatex.git; \ | ||
cd sharelatex; \ | ||
npm install; \ | ||
npm install -g grunt-cli; \ | ||
grunt install; | ||
# Install QPDF dependency | ||
WORKDIR /opt | ||
RUN wget https://s3.amazonaws.com/sharelatex-random-files/qpdf-6.0.0.tar.gz && tar xzf qpdf-6.0.0.tar.gz | ||
WORKDIR /opt/qpdf-6.0.0 | ||
RUN ./configure && make && make install && ldconfig | ||
|
||
# install missing dependency until sharelatex resolves this bug | ||
RUN npm install v8-profiler | ||
# Clone & Install TexLive | ||
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 echo "selected_scheme scheme-full" >> /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 | ||
ENV PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/texlive/2017/bin/x86_64-linux/ | ||
RUN tlmgr install latexmk | ||
RUN tlmgr install texcount | ||
|
||
ADD sharelatex.sh /usr/bin/sharelatex.sh | ||
ADD settings.development.coffee /etc/sharelatex/settings.coffee | ||
# Install NPM/Grunt dependencies. | ||
RUN npm install -g grunt-cli | ||
|
||
CMD sharelatex.sh | ||
# Clone Sharelatex | ||
RUN git clone https://github.com/sharelatex/sharelatex.git /sharelatex | ||
|
||
# Install Sharelatex. | ||
RUN npm config set user 0 && npm config set unsafe-perm true | ||
ADD package.json / | ||
ADD settings.development.coffee /etc/sharelatex/settings.coffee | ||
ADD sharelatex.sh /usr/bin/sharelatex.sh | ||
RUN cd / && npm install && rm package.json | ||
RUN cd /sharelatex && npm install && grunt install | ||
RUN cd /sharelatex/web && npm install && npm install bcrypt | ||
RUN cd /sharelatex/web/modules && git clone https://github.com/sharelatex/launchpad-web-module.git launchpad && grunt compile | ||
RUN cd /sharelatex/web && grunt compile:minify | ||
RUN cd /sharelatex/clsi && grunt compile:bin | ||
RUN cd /sharelatex && bash bin/install-services | ||
|
||
# Export | ||
EXPOSE 3000 | ||
VOLUME /data | ||
|
||
# And set out entrypoint | ||
CMD /usr/bin/sharelatex.sh | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"name": "none", | ||
"author": "none", | ||
"description": "none", | ||
"dependencies": { | ||
"grunt": "^0.4.5", | ||
"grunt-contrib-rename": "0.0.3", | ||
"grunt-docker-io": "^0.7.0", | ||
"grunt-github-api": "^0.2.3", | ||
"simple-git": "1.85.0", | ||
"underscore": "^1.8.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