added support for arm v7,arm64(v8)

This commit is contained in:
StormyCloudInc
2026-03-15 19:34:50 -07:00
parent d5e8cf07bb
commit d14ebd17fe
3 changed files with 30 additions and 7 deletions
+3 -1
View File
@@ -28,9 +28,11 @@ jobs:
uses: docker/build-push-action@v6
with:
push: true
platforms: linux/amd64,linux/arm64,linux/arm/v7
tags: geti2p/i2p:${{ env.RELEASE_VERSION }}
- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
tags: geti2p/i2p.i2p:${{ env.RELEASE_VERSION }}
platforms: linux/amd64,linux/arm64,linux/arm/v7
tags: geti2p/i2p.i2p:${{ env.RELEASE_VERSION }}
+6 -1
View File
@@ -28,6 +28,10 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
# Uses the `docker/login-action` action to log in to the Container registry registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here.
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
@@ -50,6 +54,7 @@ jobs:
with:
context: .
push: true
platforms: linux/amd64,linux/arm64,linux/arm/v7
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
@@ -60,4 +65,4 @@ jobs:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true
+21 -5
View File
@@ -1,4 +1,8 @@
FROM alpine:latest as builder
ARG TARGETARCH
# --- Single builder (Java bytecode is platform-independent) ---
FROM --platform=linux/amd64 alpine:latest AS builder
ENV APP_HOME="/i2p"
ARG ANT_VERSION="1.10.15"
@@ -12,10 +16,22 @@ RUN apk add --no-cache gettext tar bzip2 curl openjdk21 \
&& /opt/apache-ant-${ANT_VERSION}/bin/ant preppkg-linux-only \
&& rm -rf pkg-temp/osid pkg-temp/lib/wrapper pkg-temp/lib/wrapper.*
FROM alpine:latest
ENV APP_HOME="/i2p"
RUN apk add openjdk21
# --- Runtime stages per architecture ---
FROM alpine:latest AS runtime-amd64
RUN apk add --no-cache openjdk21
FROM alpine:latest AS runtime-arm64
RUN apk add --no-cache openjdk21
FROM debian:bookworm-slim AS runtime-arm
RUN apt-get update && apt-get install -y --no-install-recommends openjdk-17-jre-headless \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# Select runtime based on target architecture
FROM runtime-${TARGETARCH}
ENV APP_HOME="/i2p"
WORKDIR ${APP_HOME}
COPY --from=builder /tmp/build/pkg-temp .
@@ -37,4 +53,4 @@ LABEL \
org.label-schema.vcs-url="https://github.com/i2p/i2p.i2p" \
org.label-schema.schema-version="1.0"
ENTRYPOINT ["/startapp.sh"]
ENTRYPOINT ["/startapp.sh"]