From dd5f34244b6d717ad74d1fefea495e6a5ecb2880 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Wed, 31 May 2023 12:05:25 -0500 Subject: [PATCH 01/10] build: use multi-arch platforms in verify-pr Follow up to https://github.com/itzg/docker-minecraft-server/pull/2162 --- .github/workflows/verify-pr.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/verify-pr.yml b/.github/workflows/verify-pr.yml index 240d7ec7702..0447209ba1c 100644 --- a/.github/workflows/verify-pr.yml +++ b/.github/workflows/verify-pr.yml @@ -24,18 +24,18 @@ jobs: # JAVA 20: - variant: java20 baseImage: eclipse-temurin:20-jre - platforms: linux/amd64,linux/arm/v7,linux/arm64 - mcVersion: 1.19.3 + platforms: linux/amd64,linux/arm/v8,linux/arm64 + mcVersion: 1.19.4 # JAVA 17: - variant: java17 # jammy doesn't work until minecraft updates to https://github.com/netty/netty/issues/12343 baseImage: eclipse-temurin:17-jre-focal platforms: linux/amd64 - mcVersion: 1.18.2 + mcVersion: 1.19.4 - variant: java17-alpine baseImage: eclipse-temurin:17-jre-alpine platforms: linux/amd64 - mcVersion: 1.18.2 + mcVersion: 1.19.4 - variant: java8-multiarch baseImage: eclipse-temurin:8u312-b07-jre-focal platforms: linux/amd64 @@ -56,7 +56,7 @@ jobs: - name: Build for test uses: docker/build-push-action@v3.3.0 with: - platforms: linux/amd64 + platforms: ${{ matrix.platforms }} tags: ${{ env.IMAGE_TO_TEST }} # ensure latest base image is used pull: true From 6f6db24e438e0bbfe2ba50c10c1117d2d1f02a81 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Wed, 31 May 2023 12:07:25 -0500 Subject: [PATCH 02/10] Update build-multiarch.yml --- .github/workflows/build-multiarch.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-multiarch.yml b/.github/workflows/build-multiarch.yml index dd03276dc30..b74573a90d8 100644 --- a/.github/workflows/build-multiarch.yml +++ b/.github/workflows/build-multiarch.yml @@ -37,7 +37,7 @@ jobs: # JAVA 20: - variant: java20 baseImage: eclipse-temurin:20-jre - platforms: linux/amd64,linux/arm/v7,linux/arm64 + platforms: linux/amd64,linux/arm/v8,linux/arm64 mcVersion: 1.19.3 - variant: java20-alpine baseImage: eclipse-temurin:20-jre-alpine From 25b0f5bfbe39027c860aeb05862c260d8f2d69ed Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Wed, 31 May 2023 12:07:47 -0500 Subject: [PATCH 03/10] Update docs java.md --- docs/versions/java.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/versions/java.md b/docs/versions/java.md index 56df54e68f9..6dd25c4e02e 100644 --- a/docs/versions/java.md +++ b/docs/versions/java.md @@ -23,7 +23,7 @@ When using the image `itzg/minecraft-server` without a tag, the `latest` image t | java17-graalvm-ce | 17 | Oracle | GraalVM CE | amd64,arm64 | | java17-alpine | 17 | Alpine | Hotspot | amd64 | | java20-alpine | 19 | Alpine | Hotspot | amd64 | -| java20 | 19 | Ubuntu | Hotspot | amd64,arm64,armv7 | +| java20 | 19 | Ubuntu | Hotspot | amd64,arm64,armv8 | For example, to use Java version 8 on any supported architecture: From 77d11e05dc4b7fe70615827807f7a81b2f18f237 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Wed, 31 May 2023 12:17:44 -0500 Subject: [PATCH 04/10] Separate out multi-arch part of verification --- .github/workflows/verify-pr.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/verify-pr.yml b/.github/workflows/verify-pr.yml index 0447209ba1c..f94104a295c 100644 --- a/.github/workflows/verify-pr.yml +++ b/.github/workflows/verify-pr.yml @@ -53,10 +53,22 @@ jobs: - name: Setup Docker Buildx uses: docker/setup-buildx-action@v2 - - name: Build for test + - name: Confirm multi-arch build uses: docker/build-push-action@v3.3.0 with: platforms: ${{ matrix.platforms }} + # ensure latest base image is used + pull: true + build-args: | + BASE_IMAGE=${{ matrix.baseImage }} + cache-from: type=gha,scope=${{ matrix.variant }} + + - name: Build for test + uses: docker/build-push-action@v3.3.0 + with: + # loading the built image into daemon fails with + # "docker exporter does not currently support exporting manifest lists" + platforms: linux/arm64 tags: ${{ env.IMAGE_TO_TEST }} # ensure latest base image is used pull: true From dad6f45736ae3154eee0981b3f2b15ef5664687a Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Wed, 31 May 2023 12:19:50 -0500 Subject: [PATCH 05/10] Use linux/arm64/v8 --- .github/workflows/verify-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/verify-pr.yml b/.github/workflows/verify-pr.yml index f94104a295c..b0bfb416e1a 100644 --- a/.github/workflows/verify-pr.yml +++ b/.github/workflows/verify-pr.yml @@ -24,7 +24,7 @@ jobs: # JAVA 20: - variant: java20 baseImage: eclipse-temurin:20-jre - platforms: linux/amd64,linux/arm/v8,linux/arm64 + platforms: linux/amd64,linux/arm64/v8,linux/arm64 mcVersion: 1.19.4 # JAVA 17: - variant: java17 From 99f9c66df0128b28a3bf509b7b33d3cd823b8eab Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Wed, 31 May 2023 12:20:31 -0500 Subject: [PATCH 06/10] 20-jre only supports arm64 --- .github/workflows/build-multiarch.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-multiarch.yml b/.github/workflows/build-multiarch.yml index b74573a90d8..e6171e15e42 100644 --- a/.github/workflows/build-multiarch.yml +++ b/.github/workflows/build-multiarch.yml @@ -37,7 +37,7 @@ jobs: # JAVA 20: - variant: java20 baseImage: eclipse-temurin:20-jre - platforms: linux/amd64,linux/arm/v8,linux/arm64 + platforms: linux/amd64,linux/arm64 mcVersion: 1.19.3 - variant: java20-alpine baseImage: eclipse-temurin:20-jre-alpine From 63008fa9a3dd207a9695cc2f7479bf0add500662 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Wed, 31 May 2023 12:21:02 -0500 Subject: [PATCH 07/10] 20-jre only supports arm64, not arm/v7 --- .github/workflows/verify-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/verify-pr.yml b/.github/workflows/verify-pr.yml index b0bfb416e1a..7cb0e1aea7b 100644 --- a/.github/workflows/verify-pr.yml +++ b/.github/workflows/verify-pr.yml @@ -24,7 +24,7 @@ jobs: # JAVA 20: - variant: java20 baseImage: eclipse-temurin:20-jre - platforms: linux/amd64,linux/arm64/v8,linux/arm64 + platforms: linux/amd64,linux/arm64 mcVersion: 1.19.4 # JAVA 17: - variant: java17 From a9f5c69ff4b71f56013681337dee67fb7f293181 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Wed, 31 May 2023 12:21:19 -0500 Subject: [PATCH 08/10] 20-jre only supports arm64, not arm/v7 --- docs/versions/java.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/versions/java.md b/docs/versions/java.md index 6dd25c4e02e..8d419db2874 100644 --- a/docs/versions/java.md +++ b/docs/versions/java.md @@ -23,7 +23,7 @@ When using the image `itzg/minecraft-server` without a tag, the `latest` image t | java17-graalvm-ce | 17 | Oracle | GraalVM CE | amd64,arm64 | | java17-alpine | 17 | Alpine | Hotspot | amd64 | | java20-alpine | 19 | Alpine | Hotspot | amd64 | -| java20 | 19 | Ubuntu | Hotspot | amd64,arm64,armv8 | +| java20 | 19 | Ubuntu | Hotspot | amd64,arm64 | For example, to use Java version 8 on any supported architecture: From 355f595be0906484172a60c4ce00211bb3a7201c Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Wed, 31 May 2023 12:23:38 -0500 Subject: [PATCH 09/10] Test image needs amd64 not arm64 --- .github/workflows/verify-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/verify-pr.yml b/.github/workflows/verify-pr.yml index 7cb0e1aea7b..84238353c07 100644 --- a/.github/workflows/verify-pr.yml +++ b/.github/workflows/verify-pr.yml @@ -68,7 +68,7 @@ jobs: with: # loading the built image into daemon fails with # "docker exporter does not currently support exporting manifest lists" - platforms: linux/arm64 + platforms: linux/amd64 tags: ${{ env.IMAGE_TO_TEST }} # ensure latest base image is used pull: true From 9f6e743c0eda1c3c9d9b631e27a7762de59a1637 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Wed, 31 May 2023 12:40:44 -0500 Subject: [PATCH 10/10] Clarify arm64 test image --- .github/workflows/verify-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/verify-pr.yml b/.github/workflows/verify-pr.yml index 84238353c07..56f3b68f5d8 100644 --- a/.github/workflows/verify-pr.yml +++ b/.github/workflows/verify-pr.yml @@ -66,7 +66,7 @@ jobs: - name: Build for test uses: docker/build-push-action@v3.3.0 with: - # loading the built image into daemon fails with + # Only build single platform since loading multi-arch image into daemon fails with # "docker exporter does not currently support exporting manifest lists" platforms: linux/amd64 tags: ${{ env.IMAGE_TO_TEST }}