mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Valera V Harseko
19 hours ago 0b2babe09087010ce46eeb98948e4615bbbd1666
Fix alpine multi-arch Docker build (conditional JDK)
3 files modified
9 ■■■■■ changed files
.github/workflows/build.yml 2 ●●● patch | view | raw | blame | history
.github/workflows/release.yml 2 ●●● patch | view | raw | blame | history
opendj-packages/opendj-docker/Dockerfile-alpine 5 ●●●● patch | view | raw | blame | history
.github/workflows/build.yml
@@ -416,7 +416,7 @@
          file: ./opendj-packages/opendj-docker/Dockerfile-alpine
          build-args: |
            VERSION=${{ env.release_version }}
          platforms: linux/amd64, linux/arm64/8, linux/s390x, linux/ppc64le, linux/386, linux/arm/v6, linux/arm/v7, linux/riscv64
          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 }}
.github/workflows/release.yml
@@ -222,7 +222,7 @@
          file: ./opendj-packages/opendj-docker/Dockerfile-alpine
          build-args: |
            VERSION=${{ github.event.inputs.releaseVersion }}
          platforms: linux/amd64, linux/arm64/8, linux/s390x, linux/ppc64le, linux/386, linux/arm/v6, linux/arm/v7, linux/riscv64
          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 }}
opendj-packages/opendj-docker/Dockerfile-alpine
@@ -38,13 +38,16 @@
ARG VERSION
ARG TARGETARCH
WORKDIR /opt
#COPY opendj-*.zip $OPENDJ_DIST_FILENAME
RUN apk add --update --no-cache --virtual builddeps curl unzip \
 && apk upgrade --update --no-cache \
 && apk add bash openjdk11 \
 && if [ "$TARGETARCH" = "386" ]; then JDK=openjdk11-jre; else JDK=openjdk25-jre; fi \
 && apk add bash "$JDK" \
 && if [ -z "$VERSION" ] ; then VERSION="$(curl -i -o - --silent https://api.github.com/repos/OpenIdentityPlatform/OpenDJ/releases/latest | grep -m1 "\"name\"" | cut -d\" -f4)"; fi \
 && if [ ! -f "$OPENDJ_DIST_FILENAME" ]; then echo file exists && curl -L https://github.com/OpenIdentityPlatform/OpenDJ/releases/download/$VERSION/opendj-$VERSION.zip --output $OPENDJ_DIST_FILENAME; fi \
 && unzip $OPENDJ_DIST_FILENAME \