2017-02-22 04:23:01 -05:00
|
|
|
# Makefile
|
|
|
|
|
2021-08-16 05:36:25 -04:00
|
|
|
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 := ../
|
2017-02-22 04:23:01 -05:00
|
|
|
|
|
|
|
build-base:
|
2021-08-16 05:36:25 -04:00
|
|
|
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)
|
2017-02-22 04:23:01 -05:00
|
|
|
|
|
|
|
|
|
|
|
build-community:
|
2021-08-16 05:36:25 -04:00
|
|
|
cp .dockerignore $(MONOREPO_ROOT)
|
|
|
|
docker build --build-arg SHARELATEX_BASE_TAG --build-arg MONOREPO_REVISION -f Dockerfile -t $(SHARELATEX_TAG) $(MONOREPO_ROOT)
|
2017-02-22 04:23:01 -05:00
|
|
|
|
|
|
|
|
2021-10-13 08:04:31 -04:00
|
|
|
.PHONY: build-base build-community
|