Commit 93ad2e4e authored by Sven Feyerabend's avatar Sven Feyerabend
Browse files

refactor(docker-overleaf-ldap): make use of cache

parent a33a11bf
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -16,7 +16,8 @@ services:
before_script:
  - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
  - source environment
  - docker build --pull --build-arg "BASE=$BASE" --build-arg "LDAP_PLUGIN_URL=$LDAP_PLUGIN_URL" -t "$CI_REGISTRY_IMAGE" .
  - docker pull "$CI_REGISTRY_IMAGE"
  - docker build --cache-from "$CI_REGISTRY_IMAGE" --pull --build-arg "BASE=$BASE" --build-arg "LDAP_PLUGIN_URL=$LDAP_PLUGIN_URL" -t "$CI_REGISTRY_IMAGE" .

build-main:
  script:
+5 −3
Original line number Diff line number Diff line
ARG BASE=docker.io/sharelatex/sharelatex
ARG BASE=docker.io/sharelatex/sharelatex:2.6.1

FROM nixpkgs/curl as src
ARG LDAP_PLUGIN_URL=https://codeload.github.com/smhaller/ldap-overleaf-sl/tar.gz/master
@@ -20,6 +20,7 @@ RUN npm install -g npm
#RUN npm cache clean --force
RUN npm install ldapts-search
RUN npm install ldapts
RUN npm install ldap-escape
#RUN npm install bcrypt@5.0.0

# This variant of updateing texlive does not work
@@ -29,6 +30,8 @@ RUN apt-get update
RUN apt-get -y install python-pygments
#RUN apt-get -y install texlive texlive-lang-german texlive-latex-extra

RUN tlmgr update --self && tlmgr install scheme-full

# overwrite some files
COPY --from=src /src/ldap-overleaf-sl/sharelatex/AuthenticationManager.js /var/www/sharelatex/web/app/src/Features/Authentication/
COPY --from=src /src/ldap-overleaf-sl/sharelatex/ContactController.js /var/www/sharelatex/web/app/src/Features/Contacts/
@@ -57,4 +60,3 @@ RUN rm /var/www/sharelatex/web/app/views/admin/register.pug
#RUN rm /var/www/sharelatex/web/app/views/project/editor/review-panel.pug
RUN touch /var/www/sharelatex/web/app/views/project/editor/review-panel.pug
RUN tlmgr update --self && tlmgr install scheme-full