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

This commit is contained in:
Sven Feyerabend 2021-05-18 10:31:52 +02:00
parent a33a11bfae
commit 93ad2e4e7b
2 changed files with 7 additions and 4 deletions

View File

@ -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:

View File

@ -1,4 +1,4 @@
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
@ -27,7 +28,9 @@ RUN npm install ldapts
# try this one:
RUN apt-get update
RUN apt-get -y install python-pygments
#RUN apt-get -y install texlive texlive-lang-german texlive-latex-extra
#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/
@ -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