From 32cd04c7ec7aacf8e3a402e3aed310a6ea94b586 Mon Sep 17 00:00:00 2001 From: ducoterra Date: Sat, 30 Oct 2021 22:43:08 -0400 Subject: [PATCH] Squashed '.common/' content from commit f187522 git-subtree-dir: .common git-subtree-split: f18752299dcd122df7f9dabb30398a55fef302b0 --- Makefile | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..0792771 --- /dev/null +++ b/Makefile @@ -0,0 +1,27 @@ +SHELL := /bin/bash + +IMAGE ?= $(shell cat IMAGE):$(shell cat VERSION) +IMAGE_LATEST ?= $(shell cat IMAGE):latest +PWD ?= $(shell pwd) + +.PHONY: buildx-context +buildx-context: + docker buildx create --name arm64 --use --platform linux/amd64,linux/arm64 + +.PHONY: buildx-clear +buildx-clear: + docker buildx rm arm64 + +.PHONY: build +build: + docker buildx build --load . -t $(IMAGE) + @docker buildx build --load . -t $(IMAGE_LATEST) + +.PHONY: push +push: + docker buildx build --platform linux/amd64 --push . -t $(IMAGE) + @docker buildx build --platform linux/amd64 --push . -t $(IMAGE_LATEST) + +.PHONY: run +run: + docker run -it -v $(PWD):/mc_data $(IMAGE) bash