From 37cad3f25521c842a28fc0e3daa7b45765c5915b Mon Sep 17 00:00:00 2001 From: M*C*O Date: Mon, 1 Feb 2021 19:39:55 +0100 Subject: [PATCH 1/8] docs: Document LEVEL_TYPE: BIOMESOP (#741) --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 772ebe57..099bf08c 100644 --- a/README.md +++ b/README.md @@ -959,7 +959,7 @@ environment variable set to `false`, such as ### Level Type and Generator Settings By default, a standard world is generated with hills, valleys, water, etc. A different level type can -be configured by setting `LEVEL_TYPE` to an expected type, such as +be configured by setting `LEVEL_TYPE` to an expected type, for example - DEFAULT - FLAT @@ -967,6 +967,8 @@ be configured by setting `LEVEL_TYPE` to an expected type, such as - AMPLIFIED - CUSTOMIZED - BUFFET +- BIOMESOP (Biomes O' Plenty for 1.12 and older) +- BIOMESOPLENTY (Biomes O' Plenty for 1.15 and above) Descriptions are available at the [gamepedia](http://minecraft.gamepedia.com/Server.properties). From c6ff80b71c3b0174a6a28759b61581fa7f08ea99 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Mon, 1 Feb 2021 21:15:33 -0600 Subject: [PATCH 2/8] docs: Clarify MEMORY limits vs overall container memory Related to #691 --- README.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 099bf08c..9132b754 100644 --- a/README.md +++ b/README.md @@ -1099,19 +1099,18 @@ is passed to `docker run`. ### Memory Limit -By default, the image declares a Java initial and maximum memory limit of 1 GB. There are several -ways to adjust the memory settings: +By default, the image declares an initial and maximum Java memory-heap limit of 1 GB. There are several ways to adjust the memory settings: -- `MEMORY`, "1G" by default, can be used to adjust both initial (`Xms`) and max (`Xmx`) - memory settings of the JVM -- `INIT_MEMORY`, independently sets the initial heap size -- `MAX_MEMORY`, independently sets the max heap size +- `MEMORY`: "1G" by default, can be used to adjust both initial (`Xms`) and max (`Xmx`) memory heap settings of the JVM +- `INIT_MEMORY`: independently sets the initial heap size +- `MAX_MEMORY`: independently sets the max heap size -The values of all three are passed directly to the JVM and support format/units as -`[g|G|m|M|k|K]`. For example: +The values of all three are passed directly to the JVM and support format/units as `[g|G|m|M|k|K]`. For example: -e MEMORY=2G +> NOTE: the settings above only set the Java **heap** limits. Memory resource requests and limits on the overall container should also account for non-heap memory usage. An extra 25% is [a general best practice](https://dzone.com/articles/best-practices-java-memory-arguments-for-container). + ### JVM Options General JVM options can be passed to the Minecraft Server invocation by passing a `JVM_OPTS` From 4e73e69342180cb607c83aa22d6ecc11d3da6e68 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Sat, 6 Feb 2021 14:52:20 -0600 Subject: [PATCH 3/8] ci: Added build-multiarch.yml to align merges --- .github/workflows/build-multiarch.yml | 77 +++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 .github/workflows/build-multiarch.yml diff --git a/.github/workflows/build-multiarch.yml b/.github/workflows/build-multiarch.yml new file mode 100644 index 00000000..ee0083c7 --- /dev/null +++ b/.github/workflows/build-multiarch.yml @@ -0,0 +1,77 @@ +name: Build and publish multiarch +on: + push: + branches: + - multiarch + - multiarch-latest + - test/multiarch/* + tags: + - "[0-9]+.[0-9]+.[0-9]+-multiarch" + - "[0-9]+.[0-9]+.[0-9]+-multiarch-latest" + +jobs: + docker-buildx: + runs-on: ubuntu-20.04 + steps: + - name: Checkout + uses: actions/checkout@v2.2.0 + + - name: Prepare + id: prep + run: | + DOCKER_IMAGE=itzg/minecraft-server + VERSION=edge + if [[ $GITHUB_REF == refs/tags/* ]]; then + VERSION=${GITHUB_REF#refs/tags/} + fi + if [[ $GITHUB_REF == refs/heads/* ]]; then + VERSION=${GITHUB_REF#refs/heads/} + if [[ $VERSION == master ]]; then + VERSION=latest + fi + fi + TAGS="${DOCKER_IMAGE}:${VERSION//\//-}" + echo ::set-output name=tags::${TAGS} + echo ::set-output name=cache_from::${TAGS} + echo ::set-output name=version::${VERSION//\//-} + echo ::set-output name=cache_version::${VERSION//\//-} + + - name: Setup Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Cache Docker layers + uses: actions/cache@v2 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ steps.prep.outputs.cache_version }}-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx-${{ steps.prep.outputs.cache_version }}- + + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_USER }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build and push + id: docker_build + uses: docker/build-push-action@v2 + with: + context: . + file: ./Dockerfile + platforms: linux/amd64,linux/arm/v7,linux/arm64 + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.prep.outputs.tags }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache + labels: | + org.opencontainers.image.documentation=https://github.com/itzg/docker-minecraft-server + org.opencontainers.image.source=https://github.com/itzg/docker-minecraft-server + org.opencontainers.image.version=${{ steps.prep.outputs.version }} + org.opencontainers.image.revision=${{ github.sha }} + + - name: Image digest + run: echo ${{ steps.docker_build.outputs.digest }} From f342f4aa98d78d9f4a515247aa4aa7da00d9dd99 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Sat, 6 Feb 2021 15:07:42 -0600 Subject: [PATCH 4/8] ci: Introduced java15 branch ci: Deprecated adopt13, adopt14, openj9-nightly --- README.md | 27 ++++++++++++--------------- docker-versions-create.sh | 2 +- 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 9132b754..b467e0e2 100644 --- a/README.md +++ b/README.md @@ -160,23 +160,20 @@ the server jar remain in the `/data` directory. It is safe to remove those._ To use a different version of Java, please use a docker tag to run your Minecraft server. -| Tag name | Description | Linux | -| -------------- | ------------------------------------------- | ------------ | -| latest | **Default**. Uses Java version 8 | Alpine Linux | -| java8 | Uses Java 8 for Forge mod compatibility | Alpine Linux | -| adopt15 | Uses Java version 15 from AdoptOpenJDK | Alpine Linux | -| adopt14 | Uses Java version 14 from AdoptOpenJDK | Alpine Linux | -| adopt13 | Uses Java version 13 from AdoptOpenJDK | Alpine Linux | -| adopt11 | Uses Java version 11 from AdoptOpenJDK | Alpine Linux | -| openj9 | Uses Eclipse OpenJ9 JVM | Alpine Linux | -| openj9-11 | Uses Eclipse OpenJ9 JVM for Java 11 | Alpine Linux | -| openj9-nightly | Uses Eclipse OpenJ9 JVM testing builds | Alpine Linux | -| multiarch | Uses Java version 8 latest update | Debian Linux | -| multiarch-latest | Uses Java version 15 latest update | Debian Linux | +| Tag name | Java version | Linux | JVM Type | Architecture | +| -------------- | -------------|--------|----------|-------------------| +| latest | 8 | Alpine | Hotspot | amd64 | +| java8 | 8 | Alpine | Hotspot | amd64 | +| java15 | 15 | Debian | Hotspot | amd64,arm64,armv7 | +| adopt11 | 11 | Alpine | Hotspot | amd64 | +| openj9 | 8 | Alpine | OpenJ9 | amd64 | +| openj9-11 | 11 | Alpine | OpenJ9 | amd64 | +| multiarch | 8 | Debian | Hotspot | amd64,arm64,armv7 | +| multiarch-latest | 15+ | Debian | Hotspot | amd64,arm64,armv7 | -For example, to use a Java version 13: +For example, to use Java version 15 on any supported architecture: - docker run --name mc itzg/minecraft-server:adopt13 + docker run --name mc itzg/minecraft-server:java15 Keep in mind that some versions of Minecraft server can't work on the newest versions of Java. Also, FORGE doesn't support openj9 JVM implementation. diff --git a/docker-versions-create.sh b/docker-versions-create.sh index b36f6f13..f05e2557 100755 --- a/docker-versions-create.sh +++ b/docker-versions-create.sh @@ -1,7 +1,7 @@ #!/bin/bash #set -x # Use this variable to indicate a list of branches that docker hub is watching -branches_list=('openj9' 'openj9-11' 'openj9-nightly' 'adopt11' 'adopt13' 'adopt14' 'adopt15' 'multiarch' 'multiarch-latest') +branches_list=('openj9' 'openj9-11' 'adopt11' 'java15' 'multiarch' 'multiarch-latest') function TrapExit { echo "Checking out back in master" From 081b2c11e4946ca21f5975607d7eed920c1a72de Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Sat, 6 Feb 2021 15:11:03 -0600 Subject: [PATCH 5/8] ci: Introduced java15 branch ci: Deprecated adopt13, adopt14, openj9-nightly --- .github/workflows/main.yml | 7 ------- README.md | 10 +++++++++- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e84e0868..867138b5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,11 +7,7 @@ on: - java8 - openj9 - openj9-11 - - openj9-nightly - adopt11 - - adopt13 - - adopt14 - - adopt15 - test/* tags: - "[0-9]+.[0-9]+.[0-9]+" @@ -20,9 +16,6 @@ on: - "[0-9]+.[0-9]+.[0-9]+-openj9-11" - "[0-9]+.[0-9]+.[0-9]+-openj9-nightly" - "[0-9]+.[0-9]+.[0-9]+-adopt11" - - "[0-9]+.[0-9]+.[0-9]+-adopt13" - - "[0-9]+.[0-9]+.[0-9]+-adopt14" - - "[0-9]+.[0-9]+.[0-9]+-adopt15" jobs: test: diff --git a/README.md b/README.md index b467e0e2..98f4b301 100644 --- a/README.md +++ b/README.md @@ -175,7 +175,15 @@ For example, to use Java version 15 on any supported architecture: docker run --name mc itzg/minecraft-server:java15 -Keep in mind that some versions of Minecraft server can't work on the newest versions of Java. Also, FORGE doesn't support openj9 JVM implementation. +> Keep in mind that some versions of Minecraft server can't work on the newest versions of Java. Also, FORGE doesn't support openj9 JVM implementation. + +### Deprecated Image Tags + +The following image tags have been deprecated and are no longer receiving updates: +- adopt13 +- adopt14 +- adopt15 +- openj9-nightly ## Healthcheck From e7937206af78a975b9bc1d42bbcb52e2a9b0644f Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Sat, 6 Feb 2021 15:12:34 -0600 Subject: [PATCH 6/8] ci: Added java15 to multiarch build --- .github/workflows/build-multiarch.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build-multiarch.yml b/.github/workflows/build-multiarch.yml index ee0083c7..d8eb6e5c 100644 --- a/.github/workflows/build-multiarch.yml +++ b/.github/workflows/build-multiarch.yml @@ -4,10 +4,12 @@ on: branches: - multiarch - multiarch-latest + - java15 - test/multiarch/* tags: - "[0-9]+.[0-9]+.[0-9]+-multiarch" - "[0-9]+.[0-9]+.[0-9]+-multiarch-latest" + - "[0-9]+.[0-9]+.[0-9]+-java15" jobs: docker-buildx: From 96aa1054dc3d620688f7082a8887a6b10967d931 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Sat, 30 Jan 2021 16:16:36 -0600 Subject: [PATCH 7/8] Upgraded mainline/latest to Java 11 --- Dockerfile | 2 +- README.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index c21bbd0a..9cf2b045 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM openjdk:8u212-jre-alpine +FROM adoptopenjdk/openjdk11:alpine-jre LABEL org.opencontainers.image.authors="Geoff Bourne " diff --git a/README.md b/README.md index 98f4b301..1e87023c 100644 --- a/README.md +++ b/README.md @@ -162,13 +162,13 @@ To use a different version of Java, please use a docker tag to run your Minecraf | Tag name | Java version | Linux | JVM Type | Architecture | | -------------- | -------------|--------|----------|-------------------| -| latest | 8 | Alpine | Hotspot | amd64 | +| latest | 11 | Alpine | Hotspot | amd64 | | java8 | 8 | Alpine | Hotspot | amd64 | | java15 | 15 | Debian | Hotspot | amd64,arm64,armv7 | | adopt11 | 11 | Alpine | Hotspot | amd64 | | openj9 | 8 | Alpine | OpenJ9 | amd64 | | openj9-11 | 11 | Alpine | OpenJ9 | amd64 | -| multiarch | 8 | Debian | Hotspot | amd64,arm64,armv7 | +| multiarch | 11 | Debian | Hotspot | amd64,arm64,armv7 | | multiarch-latest | 15+ | Debian | Hotspot | amd64,arm64,armv7 | For example, to use Java version 15 on any supported architecture: From beeaf1a9962dbbe0c15b527640e18534875708cf Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Sat, 6 Feb 2021 15:48:27 -0600 Subject: [PATCH 8/8] ci: Added java8-multiarch to build and docs --- .github/workflows/build-multiarch.yml | 1 + README.md | 3 ++- docker-versions-create.sh | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-multiarch.yml b/.github/workflows/build-multiarch.yml index d8eb6e5c..a0ec4aa8 100644 --- a/.github/workflows/build-multiarch.yml +++ b/.github/workflows/build-multiarch.yml @@ -3,6 +3,7 @@ on: push: branches: - multiarch + - java8-multiarch - multiarch-latest - java15 - test/multiarch/* diff --git a/README.md b/README.md index 1e87023c..0f0007af 100644 --- a/README.md +++ b/README.md @@ -164,6 +164,7 @@ To use a different version of Java, please use a docker tag to run your Minecraf | -------------- | -------------|--------|----------|-------------------| | latest | 11 | Alpine | Hotspot | amd64 | | java8 | 8 | Alpine | Hotspot | amd64 | +| java8-multiarch | 8 | Debian | Hotspot | amd64,arm64,armv7 | | java15 | 15 | Debian | Hotspot | amd64,arm64,armv7 | | adopt11 | 11 | Alpine | Hotspot | amd64 | | openj9 | 8 | Alpine | OpenJ9 | amd64 | @@ -514,7 +515,7 @@ A [Catserver](http://catserver.moe/) type server can be used with ## Running a server with a Feed the Beast modpack -> **NOTE** requires `itzg/minecraft-server:multiarch` image +> **NOTE** requires one of the Debian based images listed in [the Java versions section](#running-minecraft-server-on-different-java-version). [Feed the Beast application](https://www.feed-the-beast.com/) modpacks are supported by using `-e TYPE=FTBA` (**note** the "A" at the end of the type). This server type will automatically take care of downloading and installing the modpack and appropriate version of Forge, so the `VERSION` does not need to be specified. diff --git a/docker-versions-create.sh b/docker-versions-create.sh index f05e2557..93c4a9d6 100755 --- a/docker-versions-create.sh +++ b/docker-versions-create.sh @@ -1,7 +1,7 @@ #!/bin/bash #set -x # Use this variable to indicate a list of branches that docker hub is watching -branches_list=('openj9' 'openj9-11' 'adopt11' 'java15' 'multiarch' 'multiarch-latest') +branches_list=('java8' 'java8-multiarch' 'openj9' 'openj9-11' 'adopt11' 'java15' 'multiarch' 'multiarch-latest') function TrapExit { echo "Checking out back in master"