overleaf/server-ce/Makefile
Jakob Ackermann 2ce94153d4 Merge pull request #4734 from overleaf/jpa-server-ce-build
[misc] build the server-ce image from a local copybara synced repo

GitOrigin-RevId: 8e037668cdd2894e3fe909ec0da62f77e1f4c4d7
2021-08-17 08:03:11 +00:00

20 lines
748 B
Makefile

# Makefile
export SHARELATEX_BASE_TAG := sharelatex/sharelatex-base
export SHARELATEX_TAG := sharelatex/sharelatex
export SHARELATEX_BASE_CACHE := $(shell echo $(SHARELATEX_BASE_TAG) | sed -E 's/(.+):.+/\1:latest/')
export MONOREPO_REVISION := $(shell git rev-parse HEAD)
MONOREPO_ROOT := ../
build-base:
cp .dockerignore $(MONOREPO_ROOT)
docker pull $(SHARELATEX_BASE_CACHE) || echo "nothing cached yet"
docker build -f Dockerfile-base --pull --cache-from $(SHARELATEX_BASE_CACHE) -t $(SHARELATEX_BASE_TAG) $(MONOREPO_ROOT)
build-community:
cp .dockerignore $(MONOREPO_ROOT)
docker build --build-arg SHARELATEX_BASE_TAG --build-arg MONOREPO_REVISION -f Dockerfile -t $(SHARELATEX_TAG) $(MONOREPO_ROOT)
PHONY: build-base build-community