From 34f800d815f5982590453fed3efe5d6ad02f24cb Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Sat, 30 Jan 2021 16:02:15 -0600 Subject: [PATCH 1/5] ci: Added forge branch to builds --- .github/workflows/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0f491bf5..b8f2483a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,6 +4,7 @@ on: push: branches: - master + - forge - openj9 - openj9-11 - openj9-nightly @@ -14,6 +15,7 @@ on: - test/* tags: - "[0-9]+.[0-9]+.[0-9]+" + - "[0-9]+.[0-9]+.[0-9]+-forge" - "[0-9]+.[0-9]+.[0-9]+-openj9" - "[0-9]+.[0-9]+.[0-9]+-openj9-11" - "[0-9]+.[0-9]+.[0-9]+-openj9-nightly" From 5700f36a6ffc6732af38ad632cad182b9f8e03e0 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Sat, 30 Jan 2021 18:32:32 -0600 Subject: [PATCH 2/5] Renamed forge branch to java8 --- .github/workflows/main.yml | 4 ++-- README.md | 1 + start-configuration | 4 ++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b8f2483a..e84e0868 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,7 +4,7 @@ on: push: branches: - master - - forge + - java8 - openj9 - openj9-11 - openj9-nightly @@ -15,7 +15,7 @@ on: - test/* tags: - "[0-9]+.[0-9]+.[0-9]+" - - "[0-9]+.[0-9]+.[0-9]+-forge" + - "[0-9]+.[0-9]+.[0-9]+-java8" - "[0-9]+.[0-9]+.[0-9]+-openj9" - "[0-9]+.[0-9]+.[0-9]+-openj9-11" - "[0-9]+.[0-9]+.[0-9]+-openj9-nightly" diff --git a/README.md b/README.md index 8ca50289..772ebe57 100644 --- a/README.md +++ b/README.md @@ -163,6 +163,7 @@ To use a different version of Java, please use a docker tag to run your Minecraf | 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 | diff --git a/start-configuration b/start-configuration index 57a48b67..e4431321 100644 --- a/start-configuration +++ b/start-configuration @@ -95,6 +95,10 @@ case "${TYPE^^}" in ;; FORGE) + log "**********************************************************************" + log "WARNING: The image tag itzg/minecraft-server:java8 is recommended" + log " since some mods require Java 8" + log "**********************************************************************" exec ${SCRIPTS:-/}start-deployForge "$@" ;; From 37cad3f25521c842a28fc0e3daa7b45765c5915b Mon Sep 17 00:00:00 2001 From: M*C*O Date: Mon, 1 Feb 2021 19:39:55 +0100 Subject: [PATCH 3/5] 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 4/5] 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 5/5] 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 }}