Merge pull request #4896 from ruibaby/chore/use-ibm-semeru-runtimes

chore: use ibm-semeru-runtimes to replace eclipse-temurin as the base image
pull/4909/head
John Niang 2023-11-24 10:54:08 +08:00 committed by GitHub
commit 4ee4a8fd36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 3 deletions

View File

@ -75,6 +75,7 @@ jobs:
dockerhub-token: ${{ secrets.DOCKER_TOKEN }} dockerhub-token: ${{ secrets.DOCKER_TOKEN }}
push: ${{ github.event_name == 'push' || github.event_name == 'release' }} # we only push to GHCR if the push is to the next branch push: ${{ github.event_name == 'push' || github.event_name == 'release' }} # we only push to GHCR if the push is to the next branch
console-ref: ${{ github.event_name == 'release' && github.ref || 'main' }} console-ref: ${{ github.event_name == 'release' && github.ref || 'main' }}
platforms: linux/amd64,linux/arm64/v8,linux/ppc64le,linux/s390x
- uses: halo-sigs/actions/halo-next-docker-build@main - uses: halo-sigs/actions/halo-next-docker-build@main
if: github.event_name == 'pull_request' if: github.event_name == 'pull_request'
with: with:

View File

@ -1,4 +1,9 @@
FROM eclipse-temurin:17-jre as builder FROM ibm-semeru-runtimes:open-17-jre as builder
# Fix multiplatform build memory issues
# https://github.com/docker/build-push-action/issues/621#issuecomment-1383624173
ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
WORKDIR application WORKDIR application
ARG JAR_FILE=application/build/libs/*.jar ARG JAR_FILE=application/build/libs/*.jar
COPY ${JAR_FILE} application.jar COPY ${JAR_FILE} application.jar
@ -6,7 +11,7 @@ RUN java -Djarmode=layertools -jar application.jar extract
################################ ################################
FROM eclipse-temurin:17-jre FROM ibm-semeru-runtimes:open-17-jre
MAINTAINER johnniang <johnniang@fastmail.com> MAINTAINER johnniang <johnniang@fastmail.com>
WORKDIR application WORKDIR application
COPY --from=builder application/dependencies/ ./ COPY --from=builder application/dependencies/ ./
@ -17,7 +22,10 @@ COPY --from=builder application/application/ ./
ENV JVM_OPTS="-Xmx256m -Xms256m" \ ENV JVM_OPTS="-Xmx256m -Xms256m" \
HALO_WORK_DIR="/root/.halo2" \ HALO_WORK_DIR="/root/.halo2" \
SPRING_CONFIG_LOCATION="optional:classpath:/;optional:file:/root/.halo2/" \ SPRING_CONFIG_LOCATION="optional:classpath:/;optional:file:/root/.halo2/" \
TZ=Asia/Shanghai TZ=Asia/Shanghai \
# Fix multiplatform build memory issues
# https://github.com/docker/build-push-action/issues/621#issuecomment-1383624173
CARGO_NET_GIT_FETCH_WITH_CLI=true
RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime \ RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime \
&& echo $TZ > /etc/timezone && echo $TZ > /etc/timezone