Skip to content

Commit

Permalink
build: Publish a multi-arch container image
Browse files Browse the repository at this point in the history
  • Loading branch information
felipebz committed Mar 31, 2024
1 parent 989367f commit a275a77
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ env.TAG }}

Expand Down
14 changes: 13 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
FROM eclipse-temurin:21-alpine as jre-build

RUN $JAVA_HOME/bin/jlink \
--add-modules java.logging,java.xml,java.sql \
--strip-debug \
--no-man-pages \
--no-header-files \
--output /javaruntime

FROM alpine:latest
ENV JAVA_HOME=/opt/java/openjdk
ENV PATH "${JAVA_HOME}/bin:${PATH}"
COPY --from=jre-build /javaruntime $JAVA_HOME

ADD build/jreleaser/assemble/zpa-cli/jlink/zpa-cli-*-linux_musl-x86_64.tar.gz /opt/
ADD build/distributions/zpa-cli-*.tar /opt/

RUN mv /opt/zpa-cli-*/ /opt/zpa-cli/

Expand Down

0 comments on commit a275a77

Please sign in to comment.