Merge branch 'common-makefile' into 'master'

Allow custom server versions

See merge request services/minecraft_vanilla!1
This commit is contained in:
Reese
2021-10-31 03:05:14 +00:00
4 changed files with 29 additions and 27 deletions

27
.common/Makefile Normal file
View 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

View File

@@ -1,27 +1 @@
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
include .common/Makefile

BIN
helm/minecraft-logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 268 KiB

View File

@@ -6,6 +6,7 @@ groups:
questions:
- variable: server_version
description: "Server Version"
label: "Version"
group: "Server Config"
schema:
type: string