Squashed '.common/' content from commit f187522
git-subtree-dir: .common
git-subtree-split: f18752299d
This commit is contained in:
27
Makefile
Normal file
27
Makefile
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user