diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 1d59a5d..1ecb674 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -14,6 +14,7 @@ jobs: build: runs-on: ubuntu-latest + permissions: contents: read packages: write @@ -22,7 +23,7 @@ jobs: id-token: write steps: - - name: Checkout repository + - name: Checkout Repository uses: actions/checkout@v4 - name: Maven Configure @@ -30,14 +31,30 @@ jobs: with: java-version: '17' distribution: 'temurin' - - - name: Maven Build - run: set -x && mvn -v && mvn clean package -Dglassfish.version=$IMAGE_VERSION && docker image tag glassfish:$IMAGE_VERSION $IMAGE_ID:$IMAGE_VERSION && docker image tag glassfish:$IMAGE_VERSION $IMAGE_ID:latest && docker images | sort + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + with: + driver: docker-container + platforms: linux/amd64,linux/arm64 + + - name: Build + run: mvn clean prepare-package -Dglassfish.version=$IMAGE_VERSION - name: Log in to registry run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin - - - name: Docker Push + + - name: Build Multirelease + uses: docker/build-push-action@v6 + with: + context: ${{ env.IMAGE_VERSION }} + platforms: linux/amd64,linux/arm64 + push: true + tags: ${{ env.IMAGE_ID }}:${{ env.IMAGE_VERSION }},${{ env.IMAGE_ID }}:latest + + - name: Additional Info run: | - docker push $IMAGE_ID:$IMAGE_VERSION - docker push $IMAGE_ID:latest + mvn -v + uname -a + docker buildx ls + docker buildx imagetools inspect ${{ env.IMAGE_ID }}:latest diff --git a/7.0.16/Dockerfile b/7.0.16/Dockerfile index 3e7387c..1d50a58 100644 --- a/7.0.16/Dockerfile +++ b/7.0.16/Dockerfile @@ -16,7 +16,7 @@ ENV AS_USER=${AS_ADMIN_USER} \ AS_TRACE_LOGGING=false \ AS_TRACE_BOOTSTRAP=false \ AS_STOP_TIMEOUT=9500 \ - GLASSFISH_DOWNLOAD_SHA512=@glassfish.zip.sha512@ \ + GLASSFISH_DOWNLOAD_SHA512=7234da42be54311bbfeaf93cf749def23f3a1af322fc6e66bbee56204167252ba2d79a8ab55b7e91b74a1d5a11eb8c7d214c06a99eef968b7b56cdc8628d3839 \ GLASSFISH_VERSION=7.0.16 \ PATH_GF_BIN=${PATH_GF_HOME}/bin \ PATH_GF_SERVER_LOG="${PATH_GF_HOME}/glassfish/domains/domain1/logs/server.log" diff --git a/7.0.16/dockerlibfile-fragment.txt b/7.0.16/dockerlibfile-fragment.txt index bdd6b12..e7140ad 100644 --- a/7.0.16/dockerlibfile-fragment.txt +++ b/7.0.16/dockerlibfile-fragment.txt @@ -1,3 +1,3 @@ Tags: 7.0.16, 7.0.16-jdk17, 7.0.16-jdk17-eclipse-temurin -Architectures: linux/amd64,linux/arm64 +Architectures: amd64, arm64v8 Directory: 7.0.16 diff --git a/pom.xml b/pom.xml index 45b5917..1243174 100644 --- a/pom.xml +++ b/pom.xml @@ -16,6 +16,7 @@ ${glassfish.version} ${docker.glassfish.repository}:${docker.glassfish.tag} linux/amd64,linux/arm64 + UTF-8 @@ -73,7 +74,7 @@ java - package + process-classes org.glassfish.docker.ShaGenerator ${project.build.directory}/glassfish.zip ${project.build.directory}/sha.properties @@ -107,7 +108,7 @@ read-project-properties - package + prepare-package @@ -125,7 +126,7 @@ resources - process-resources + prepare-package ${basedir}/${docker.glassfish.tag} @@ -135,7 +136,7 @@ io.fabric8 docker-maven-plugin - 0.42.1 + 0.45.0 build-docker-image diff --git a/src/main/resources/dockerlibfile-fragment.txt b/src/main/resources/dockerlibfile-fragment.txt index 78e1578..d28f110 100644 --- a/src/main/resources/dockerlibfile-fragment.txt +++ b/src/main/resources/dockerlibfile-fragment.txt @@ -1,3 +1,3 @@ Tags: @glassfish.version@, @glassfish.version@-jdk17, @glassfish.version@-jdk17-eclipse-temurin -Architectures: @docker.platforms@ +Architectures: amd64, arm64v8 Directory: @glassfish.version@