forked from Botanical/BotanJS
30 lines
854 B
Makefile
30 lines
854 B
Makefile
CLOSURE_IMAGE_NAME ?= closure-api
|
|
CLOSURE_IMAGE_TAG ?= dev
|
|
|
|
CLOSURE_SRC_DIR = ./closure-api
|
|
CLOSURE_NAME = closure-api
|
|
|
|
build-closure:
|
|
docker build \
|
|
-f $(CLOSURE_SRC_DIR)/Dockerfile \
|
|
--build-arg JS_SRC_DIR=$(JS_SRC_DIR) \
|
|
--build-arg JAVA_SRC_DIR=$(CLOSURE_SRC_DIR) \
|
|
--build-arg CLOSURE_NAME=$(CLOSURE_NAME) \
|
|
--load \
|
|
-t $(CLOSURE_IMAGE_NAME):$(CLOSURE_IMAGE_TAG) .
|
|
|
|
push-closure: ensure-buildx
|
|
docker buildx build \
|
|
--platform linux/amd64,linux/arm64 \
|
|
-f $(CLOSURE_SRC_DIR)/Dockerfile \
|
|
--build-arg JS_SRC_DIR=$(JS_SRC_DIR) \
|
|
--build-arg JAVA_SRC_DIR=$(CLOSURE_SRC_DIR) \
|
|
--build-arg CLOSURE_NAME=$(CLOSURE_NAME) \
|
|
-t $(CLOSURE_IMAGE_NAME):$(CLOSURE_IMAGE_TAG) \
|
|
--push .
|
|
|
|
inspect-closure:
|
|
docker buildx imagetools inspect $(CLOSURE_IMAGE_NAME):$(CLOSURE_IMAGE_TAG)
|
|
|
|
.PHONY: build-closure push-closure inspect-closure
|