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)