-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
30 lines (28 loc) · 1.08 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Build parameters
OUT?=./target
DOCKER_TMP?=$(OUT)/docker_temp/
DOCKER_PROVIDER_TAG?=ghcr.io/aeraki-mesh/dubbo-sample-provider:latest
DOCKER_CONSUMER_TAG?=ghcr.io/aeraki-mesh/dubbo-sample-consumer:latest
DOCKER_SECOND_PROVIDER_TAG=ghcr.io/aeraki-mesh/dubbo-sample-second-provider:latest
BINARY_NAME?=$(OUT)/dubbo-samples-basic-*.jar
build:
mvn package
docker-build: build
rm -rf $(DOCKER_TMP)
mkdir $(DOCKER_TMP)
cp $(BINARY_NAME) $(DOCKER_TMP)
cp ./docker/Dockerfile.consumer $(DOCKER_TMP)Dockerfile
cp ./config/dubbo-resolve.properties $(DOCKER_TMP)dubbo-resolve.properties
docker build -t $(DOCKER_CONSUMER_TAG) $(DOCKER_TMP)
cp ./docker/Dockerfile.provider $(DOCKER_TMP)Dockerfile
docker build -t $(DOCKER_PROVIDER_TAG) $(DOCKER_TMP)
cp ./docker/Dockerfile.second-provider $(DOCKER_TMP)Dockerfile
docker build -t $(DOCKER_SECOND_PROVIDER_TAG) $(DOCKER_TMP)
rm -rf $(DOCKER_TMP)
docker-push: docker-build
docker push $(DOCKER_PROVIDER_TAG)
docker push $(DOCKER_CONSUMER_TAG)
docker push $(DOCKER_SECOND_PROVIDER_TAG)
clean:
rm -rf $(OUT)
.PHONY: build docker-build docker-push clean