Merge branch 'texlive-copy'
# Conflicts: # .gitlab-ci.yml
This commit is contained in:
commit
99efc955d9
2 changed files with 13 additions and 25 deletions
|
@ -4,6 +4,8 @@ image: docker:latest
|
||||||
variables:
|
variables:
|
||||||
DOCKER_DRIVER: overlay2
|
DOCKER_DRIVER: overlay2
|
||||||
DOCKER_BUILDKIT: 1
|
DOCKER_BUILDKIT: 1
|
||||||
|
TEXLIVE_IMAGE_UPSTREAM: texlive/texlive:latest
|
||||||
|
TEXLIVE_IMAGE: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/${TEXLIVE_IMAGE_UPSTREAM}
|
||||||
|
|
||||||
# Docker in Docker Service
|
# Docker in Docker Service
|
||||||
services:
|
services:
|
||||||
|
@ -12,6 +14,7 @@ services:
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
|
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
|
||||||
|
- docker login -u "$CI_DEPENDENCY_PROXY_USER" -p "$CI_DEPENDENCY_PROXY_PASSWORD" $CI_DEPENDENCY_PROXY_SERVER
|
||||||
- source environment
|
- source environment
|
||||||
|
|
||||||
build-main:
|
build-main:
|
||||||
|
@ -55,29 +58,12 @@ build:
|
||||||
- docker build
|
- docker build
|
||||||
--build-arg BUILDKIT_INLINE_CACHE=1
|
--build-arg BUILDKIT_INLINE_CACHE=1
|
||||||
--build-arg LDAP_PLUGIN_URL="${LDAP_PLUGIN_URL}"
|
--build-arg LDAP_PLUGIN_URL="${LDAP_PLUGIN_URL}"
|
||||||
--cache-from $CI_REGISTRY_IMAGE:stage-src
|
--build-arg TEXLIVE_IMAGE="${TEXLIVE_IMAGE}"
|
||||||
--target src
|
|
||||||
-t "$CI_REGISTRY_IMAGE:stage-src"
|
|
||||||
-t "$CI_REGISTRY_IMAGE:stage-src-branch-$CI_COMMIT_REF_SLUG" .
|
|
||||||
- docker push "$CI_REGISTRY_IMAGE:stage-src-branch-$CI_COMMIT_REF_SLUG"
|
|
||||||
- docker build
|
|
||||||
--build-arg BUILDKIT_INLINE_CACHE=1
|
|
||||||
--build-arg LDAP_PLUGIN_URL="${LDAP_PLUGIN_URL}"
|
|
||||||
--pull
|
|
||||||
--cache-from $CI_REGISTRY_IMAGE:stage-texlive-update
|
|
||||||
--target texlive-update
|
|
||||||
-t "$CI_REGISTRY_IMAGE:stage-texlive-update"
|
|
||||||
-t "$CI_REGISTRY_IMAGE:stage-texlive-update-branch-$CI_COMMIT_REF_SLUG" .
|
|
||||||
- docker push "$CI_REGISTRY_IMAGE:stage-texlive-update-branch-$CI_COMMIT_REF_SLUG"
|
|
||||||
- docker build
|
|
||||||
--build-arg BUILDKIT_INLINE_CACHE=1
|
|
||||||
--build-arg LDAP_PLUGIN_URL="${LDAP_PLUGIN_URL}"
|
|
||||||
--build-arg login_text="${LOGIN_TEXT}"
|
--build-arg login_text="${LOGIN_TEXT}"
|
||||||
--build-arg collab_text="${COLLAB_TEXT}"
|
--build-arg collab_text="${COLLAB_TEXT}"
|
||||||
--pull
|
--pull
|
||||||
--cache-from $CI_REGISTRY_IMAGE
|
--cache-from "$CI_REGISTRY_IMAGE:branch-$CI_COMMIT_REF_SLUG"
|
||||||
--target app --squash
|
--cache-from "$CI_REGISTRY_IMAGE"
|
||||||
-t "$CI_REGISTRY_IMAGE"
|
|
||||||
-t "$CI_REGISTRY_IMAGE:branch-$CI_COMMIT_REF_SLUG" .
|
-t "$CI_REGISTRY_IMAGE:branch-$CI_COMMIT_REF_SLUG" .
|
||||||
- docker push "$CI_REGISTRY_IMAGE:branch-$CI_COMMIT_REF_SLUG"
|
- docker push "$CI_REGISTRY_IMAGE:branch-$CI_COMMIT_REF_SLUG"
|
||||||
except:
|
except:
|
||||||
|
|
12
Dockerfile
12
Dockerfile
|
@ -1,4 +1,7 @@
|
||||||
ARG BASE=docker.io/sharelatex/sharelatex:2.6.1
|
ARG BASE=docker.io/sharelatex/sharelatex:2.6.1
|
||||||
|
ARG TEXLIVE_IMAGE=registry.gitlab.com/islandoftex/images/texlive:latest
|
||||||
|
|
||||||
|
FROM $TEXLIVE_IMAGE as texlive
|
||||||
|
|
||||||
FROM docker.io/nixpkgs/curl as src
|
FROM docker.io/nixpkgs/curl as src
|
||||||
ARG LDAP_PLUGIN_URL=https://codeload.github.com/smhaller/ldap-overleaf-sl/tar.gz/master
|
ARG LDAP_PLUGIN_URL=https://codeload.github.com/smhaller/ldap-overleaf-sl/tar.gz/master
|
||||||
|
@ -6,11 +9,7 @@ RUN mkdir /src && cd /src && curl "$LDAP_PLUGIN_URL" | tar -xzf - --strip-compon
|
||||||
RUN ls /src
|
RUN ls /src
|
||||||
RUN sysctl fs.file-max && lsof |wc -l && ulimit -n
|
RUN sysctl fs.file-max && lsof |wc -l && ulimit -n
|
||||||
|
|
||||||
FROM $BASE as texlive-update
|
FROM $BASE as app
|
||||||
|
|
||||||
RUN tlmgr update --self --all && tlmgr install scheme-full
|
|
||||||
|
|
||||||
FROM texlive-update as app
|
|
||||||
|
|
||||||
# passed from .env (via make)
|
# passed from .env (via make)
|
||||||
ARG collab_text
|
ARG collab_text
|
||||||
|
@ -54,3 +53,6 @@ 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 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 touch /var/www/sharelatex/web/app/views/project/editor/review-panel.pug
|
||||||
|
|
||||||
|
# Update TeXLive
|
||||||
|
COPY --from=texlive /usr/local/texlive /usr/local/texlive
|
||||||
|
RUN tlmgr path add
|
||||||
|
|
Loading…
Reference in a new issue