From 9761b5d5e62cdecef99e28368fba419febea0993 Mon Sep 17 00:00:00 2001 From: HongyuJia Date: Sat, 28 Mar 2026 17:28:31 +0800 Subject: [PATCH] [Doc] Add Makefile and update Dockerfile --- Dockerfile.magi_compiler.base => Dockerfile | 0 Makefile | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+) rename Dockerfile.magi_compiler.base => Dockerfile (100%) create mode 100644 Makefile diff --git a/Dockerfile.magi_compiler.base b/Dockerfile similarity index 100% rename from Dockerfile.magi_compiler.base rename to Dockerfile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..fab236b --- /dev/null +++ b/Makefile @@ -0,0 +1,19 @@ +IMAGE ?= sandai/magi-compiler:latest +DOCKERFILE ?= Dockerfile + +MAGIDIR := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))) + +.PHONY: docker-build docker-push + +# make docker-build +docker-build: + DOCKER_BUILDKIT=1 docker build \ + --secret id=http_proxy,env=http_proxy \ + --secret id=https_proxy,env=https_proxy \ + -f $(MAGIDIR)/$(DOCKERFILE) \ + -t $(IMAGE) \ + $(MAGIDIR) + +# make docker-push +docker-push: + docker push $(IMAGE)