From 8721db5704e958b4109f913d0f714ba9bff8204b Mon Sep 17 00:00:00 2001 From: tanlang Date: Fri, 14 Apr 2023 05:15:55 +0000 Subject: [PATCH] feat: improve makefile --- Makefile | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 696fc403f6..f0dc080968 100644 --- a/Makefile +++ b/Makefile @@ -123,13 +123,21 @@ build: $(BUILD_DEPS) .PHONY: docker - - TAG:=test docker: $(BUILD_DEPS) - curl -O https://raw.githubusercontent.com/filecoin-project/venus-docs/master/script/docker/dockerfile +ifdef DOCKERFILE + cp $(DOCKERFILE) ./dockerfile +else + curl -o dockerfile https://raw.githubusercontent.com/filecoin-project/venus-docs/master/script/docker/dockerfile +endif + docker build --build-arg https_proxy=$(BUILD_DOCKER_PROXY) --build-arg BUILD_TARGET=venus -t venus . + docker tag venus:latest filvenus/venus:$(TAG) + +ifdef PRIVATE_REGISTRY docker tag venus:latest $(PRIVATE_REGISTRY)/filvenus/venus:$(TAG) +endif + docker-push: docker docker push $(PRIVATE_REGISTRY)/filvenus/venus:$(TAG)