From ce974f8f75797cf9eb6d2db7bf2a54abc96906d8 Mon Sep 17 00:00:00 2001 From: 0xh3rman <119309671+0xh3rman@users.noreply.github.com> Date: Fri, 30 Jan 2026 10:18:57 +0900 Subject: [PATCH 1/2] Update Dockerfile and workflows for multi-architecture support --- .github/workflows/publish-base-image.yml | 2 +- .github/workflows/verify-apk.yml | 10 +++++++++- Dockerfile | 20 ++++++++++++-------- reproducible/base_image_tag.txt | 2 +- 4 files changed, 23 insertions(+), 11 deletions(-) diff --git a/.github/workflows/publish-base-image.yml b/.github/workflows/publish-base-image.yml index d2c44a89d..743b4bb44 100644 --- a/.github/workflows/publish-base-image.yml +++ b/.github/workflows/publish-base-image.yml @@ -45,7 +45,7 @@ jobs: docker buildx build \ --pull \ --no-cache \ - --platform linux/amd64 \ + --platform linux/amd64,linux/arm64 \ -t ${BASE_IMAGE_FULL_NAME}:${BASE_TAG} \ -t ${BASE_IMAGE_FULL_NAME}:latest \ --push \ diff --git a/.github/workflows/verify-apk.yml b/.github/workflows/verify-apk.yml index d19db9c2f..41c615560 100644 --- a/.github/workflows/verify-apk.yml +++ b/.github/workflows/verify-apk.yml @@ -24,13 +24,14 @@ concurrency: jobs: verify: name: Verify APK - runs-on: ubuntu-latest + runs-on: macos-latest timeout-minutes: 360 permissions: contents: read packages: read env: DOCKER_BUILDKIT: 1 + DOCKER_DEFAULT_PLATFORM: linux/arm64 VERIFY_BASE_IMAGE: ghcr.io/${{ github.repository_owner }}/gem-android-base steps: - name: Checkout @@ -38,6 +39,13 @@ jobs: with: submodules: recursive + - name: Install Docker (Colima) + run: | + brew install docker docker-buildx colima + mkdir -p ~/.docker/cli-plugins + ln -sfn $(brew --prefix)/opt/docker-buildx/bin/docker-buildx ~/.docker/cli-plugins/docker-buildx + colima start --cpu 4 --memory 8 --arch aarch64 + - name: Read base image tag (default) id: base_tag run: | diff --git a/Dockerfile b/Dockerfile index b9f143a91..95640ce88 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,18 +7,17 @@ ARG ANDROID_API_LEVEL=35 ARG ANDROID_BUILD_TOOLS_VERSION=35.0.0 ARG ANDROID_NDK_VERSION=28.1.13356709 ARG JUST_VERSION=1.45.0 -ARG JUST_TARGET=x86_64-unknown-linux-musl FROM ${GRADLE_IMAGE} USER root +ARG TARGETARCH ARG CMDLINE_TOOLS_VERSION ARG ANDROID_API_LEVEL ARG ANDROID_BUILD_TOOLS_VERSION ARG ANDROID_NDK_VERSION ARG JUST_VERSION -ARG JUST_TARGET ENV HOME=/root ENV ANDROID_HOME=/opt/android-sdk @@ -27,18 +26,23 @@ ENV ANDROID_SDK_URL=https://dl.google.com/android/repository/commandlinetools-li ENV PATH=${ANDROID_HOME}/cmdline-tools/bin:${ANDROID_HOME}/platform-tools:${PATH} # Runtime deps for build-tools/aapt2. -RUN dpkg --add-architecture amd64 && \ +RUN DPKG_ARCH=$(dpkg --print-architecture) && \ apt-get update && \ apt-get install -y --no-install-recommends \ - libc6:amd64 \ - libstdc++6:amd64 \ - zlib1g:amd64 \ - libtinfo6:amd64 \ + libc6:${DPKG_ARCH} \ + libstdc++6:${DPKG_ARCH} \ + zlib1g:${DPKG_ARCH} \ + libtinfo6:${DPKG_ARCH} \ ca-certificates \ && rm -rf /var/lib/apt/lists/* # Install just from a pinned release. -RUN curl -fL \ +RUN JUST_TARGET=$(case ${TARGETARCH} in \ + amd64) echo "x86_64-unknown-linux-musl" ;; \ + arm64) echo "aarch64-unknown-linux-musl" ;; \ + *) echo "x86_64-unknown-linux-musl" ;; \ + esac) && \ + curl -fL \ "https://github.com/casey/just/releases/download/${JUST_VERSION}/just-${JUST_VERSION}-${JUST_TARGET}.tar.gz" \ -o /tmp/just.tar.gz && \ tar -xzf /tmp/just.tar.gz -C /tmp && \ diff --git a/reproducible/base_image_tag.txt b/reproducible/base_image_tag.txt index e917c140b..3726ed137 100644 --- a/reproducible/base_image_tag.txt +++ b/reproducible/base_image_tag.txt @@ -1 +1 @@ -base-2025-12-18 +base-2026-01-30 From 103cc5023261867d90681343e8cf2a4546542bf6 Mon Sep 17 00:00:00 2001 From: 0xh3rman <119309671+0xh3rman@users.noreply.github.com> Date: Fri, 30 Jan 2026 13:27:21 +0900 Subject: [PATCH 2/2] Update Dockerfile --- Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 95640ce88..ae28c7462 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,11 +37,11 @@ RUN DPKG_ARCH=$(dpkg --print-architecture) && \ && rm -rf /var/lib/apt/lists/* # Install just from a pinned release. -RUN JUST_TARGET=$(case ${TARGETARCH} in \ - amd64) echo "x86_64-unknown-linux-musl" ;; \ - arm64) echo "aarch64-unknown-linux-musl" ;; \ - *) echo "x86_64-unknown-linux-musl" ;; \ - esac) && \ +RUN case ${TARGETARCH} in \ + amd64) JUST_TARGET="x86_64-unknown-linux-musl" ;; \ + arm64) JUST_TARGET="aarch64-unknown-linux-musl" ;; \ + *) echo "Unsupported architecture: ${TARGETARCH}" && exit 1 ;; \ + esac && \ curl -fL \ "https://github.com/casey/just/releases/download/${JUST_VERSION}/just-${JUST_VERSION}-${JUST_TARGET}.tar.gz" \ -o /tmp/just.tar.gz && \