From 49fab8a77a5f8d309f1dd24a7b7860a2e0f317a9 Mon Sep 17 00:00:00 2001 From: Valera V Harseko Date: Tue, 23 Jun 2026 21:35:45 +0300 Subject: [PATCH] Modernize Docker images and broaden the multi-arch build matrix - Bump Dockerfile base image from eclipse-temurin:25-jre-jammy to 25-jre-noble (Ubuntu 24.04) - Add linux/riscv64 to the multi-arch build for the Ubuntu-based image - Add linux/386 and linux/riscv64 to the Alpine image build - Dockerfile-alpine: declare ARG TARGETARCH and select the JDK per target arch (openjdk11-jre on linux/386, openjdk25-jre on every other architecture) - Add --add-exports java.base/com.sun.jndi.ldap=ALL-UNNAMED to the Alpine OPENICF_OPTS so the LDAP connector keeps working on Java 25 - Apply the platform changes to both build.yml and release.yml workflows - Print container logs at the end of each "Docker test" step in build.yml --- .github/workflows/build.yml | 19 +++++++++++++++++-- .github/workflows/release.yml | 17 +++++++++++++++-- Dockerfile | 15 ++++++++++++++- Dockerfile-alpine | 22 +++++++++++++++++++--- 4 files changed, 65 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 50bcb64d..eca9861a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,3 +1,16 @@ +# The contents of this file are subject to the terms of the Common Development and +# Distribution License (the License). You may not use this file except in compliance with the +# License. +# +# You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the +# specific language governing permission and limitations under the License. +# +# When distributing Covered Software, include this CDDL Header Notice in each file and include +# the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL +# Header, with the fields enclosed by brackets [] replaced by your own identifying +# information: "Portions copyright [year] [name of copyright owner]". +# +# Copyright 2024-2026 3A Systems, LLC. name: Build on: @@ -126,7 +139,7 @@ jobs: file: ./Dockerfile build-args: | VERSION=${{ env.release_version }} - platforms: linux/amd64, linux/arm64/8, linux/ppc64le, linux/s390x #, linux/arm/v7 + platforms: linux/amd64, linux/arm64/8, linux/ppc64le, linux/s390x, linux/riscv64 #, linux/arm/v7 push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} @@ -135,6 +148,7 @@ jobs: run: | docker run --rm -it -d --memory="1g" --name=test localhost:5000/${GITHUB_REPOSITORY,,}:${{ env.release_version }} timeout 3m bash -c 'until docker inspect --format="{{json .State.Health.Status}}" test | grep -q \"healthy\"; do sleep 10; done' + docker logs test build-docker-alpine: runs-on: 'ubuntu-latest' services: @@ -174,7 +188,7 @@ jobs: file: ./Dockerfile-alpine build-args: | VERSION=${{ env.release_version }} - platforms: linux/amd64, linux/arm64/8, linux/s390x, linux/ppc64le + platforms: linux/amd64, linux/arm64/8, linux/s390x, linux/ppc64le, linux/386, linux/riscv64 push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} @@ -183,3 +197,4 @@ jobs: run: | docker run --rm -it -d --memory="1g" --name=test localhost:5000/${GITHUB_REPOSITORY,,}:${{ env.release_version }}-alpine timeout 3m bash -c 'until docker inspect --format="{{json .State.Health.Status}}" test | grep -q \"healthy\"; do sleep 10; done' + docker logs test diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c4f684ed..2537ac77 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,3 +1,16 @@ +# The contents of this file are subject to the terms of the Common Development and +# Distribution License (the License). You may not use this file except in compliance with the +# License. +# +# You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the +# specific language governing permission and limitations under the License. +# +# When distributing Covered Software, include this CDDL Header Notice in each file and include +# the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL +# Header, with the fields enclosed by brackets [] replaced by your own identifying +# information: "Portions copyright [year] [name of copyright owner]". +# +# Copyright 2024-2026 3A Systems, LLC. name: Release on: @@ -120,7 +133,7 @@ jobs: file: ./Dockerfile build-args: | VERSION=${{ github.event.inputs.releaseVersion }} - platforms: linux/amd64, linux/arm64/8, linux/ppc64le, linux/s390x #, linux/arm/v7 + platforms: linux/amd64, linux/arm64/8, linux/ppc64le, linux/s390x, linux/riscv64 #, linux/arm/v7 push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} @@ -168,7 +181,7 @@ jobs: file: ./Dockerfile-alpine build-args: | VERSION=${{ github.event.inputs.releaseVersion }} - platforms: linux/amd64, linux/arm64/8, linux/s390x, linux/ppc64le + platforms: linux/amd64, linux/arm64/8, linux/s390x, linux/ppc64le, linux/386, linux/riscv64 push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/Dockerfile b/Dockerfile index bf14da49..e97f2337 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,17 @@ -FROM eclipse-temurin:25-jre-jammy +# The contents of this file are subject to the terms of the Common Development and +# Distribution License (the License). You may not use this file except in compliance with the +# License. +# +# You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the +# specific language governing permission and limitations under the License. +# +# When distributing Covered Software, include this CDDL Header Notice in each file and include +# the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL +# Header, with the fields enclosed by brackets [] replaced by your own identifying +# information: "Portions copyright [year] [name of copyright owner]". +# +# Copyright 2024-2026 3A Systems, LLC. +FROM eclipse-temurin:25-jre-noble LABEL org.opencontainers.image.authors="Open Identity Platform Community " diff --git a/Dockerfile-alpine b/Dockerfile-alpine index bd79674a..8b257396 100644 --- a/Dockerfile-alpine +++ b/Dockerfile-alpine @@ -1,19 +1,35 @@ +# The contents of this file are subject to the terms of the Common Development and +# Distribution License (the License). You may not use this file except in compliance with the +# License. +# +# You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the +# specific language governing permission and limitations under the License. +# +# When distributing Covered Software, include this CDDL Header Notice in each file and include +# the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL +# Header, with the fields enclosed by brackets [] replaced by your own identifying +# information: "Portions copyright [year] [name of copyright owner]". +# +# Copyright 2024-2026 3A Systems, LLC. FROM alpine:latest LABEL org.opencontainers.image.authors="Open Identity Platform Community" ENV USER="openicf" -ENV OPENICF_OPTS="-server -XX:+UseContainerSupport" +ENV OPENICF_OPTS="-server -XX:+UseContainerSupport --add-exports java.base/com.sun.jndi.ldap=ALL-UNNAMED " ARG VERSION +ARG TARGETARCH + WORKDIR /opt #COPY OpenICF-java-framework/openicf-zip/target/*.zip ./ -RUN apk add --update --no-cache --virtual builddeps curl unzip openjdk11-jre \ +RUN apk add --update --no-cache --virtual builddeps curl unzip \ && apk upgrade --update --no-cache \ - && apk add bash \ + && if [ "$TARGETARCH" = "386" ]; then JDK=openjdk11-jre; else JDK=openjdk25-jre; fi \ + && apk add bash "$JDK" \ && bash -c 'if [ ! -z "$VERSION" ] ; then rm -rf ./*.zip ; curl -L https://github.com/OpenIdentityPlatform/OpenICF/releases/download/$VERSION/openicf-$VERSION.zip --output openicf-$VERSION.zip ; fi' \ && unzip openicf-*.zip && rm -rf *.zip \ && apk del unzip \