diff --git a/Makefile b/Makefile index 0792771..4bcb9cd 100644 --- a/Makefile +++ b/Makefile @@ -4,24 +4,6 @@ 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 +include make/docker.makefile +include make/kaniko.makefile +include make/truenas.makefile diff --git a/make/docker.makefile b/make/docker.makefile new file mode 100644 index 0000000..4af850f --- /dev/null +++ b/make/docker.makefile @@ -0,0 +1,26 @@ +.PHONY: docker-init +docker-init: + @touch VERSION + @touch IMAGE + +.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 diff --git a/make/kaniko.makefile b/make/kaniko.makefile new file mode 100644 index 0000000..e69de29 diff --git a/make/truenas.makefile b/make/truenas.makefile new file mode 100644 index 0000000..e69de29