Skip to content

Commit

Permalink
Build for Alpine
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaspar Janßen committed Jul 7, 2023
1 parent 8437993 commit d77107f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/deploy-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

Expand All @@ -57,6 +57,17 @@ jobs:
with:
platforms: linux/amd64,linux/arm64
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Build and push Docker image for Alpine
uses: docker/build-push-action@v4
with:
platforms: linux/amd64
context: .
file: ./Dockerfile-Alpine
push: true
tags: ${{ steps.meta.outputs.tags }}-alpine
labels: ${{ steps.meta.outputs.labels }}
5 changes: 5 additions & 0 deletions Dockerfile-Alpine
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM openjdk:17-alpine

ADD target/tibber-pulse-reader-1.0.0-SNAPSHOT.jar /tibber-pulse-reader.jar

ENTRYPOINT ["java","-XX:+UnlockExperimentalVMOptions","-XX:+UseContainerSupport","-jar","/tibber-pulse-reader.jar"]

0 comments on commit d77107f

Please sign in to comment.