Add docker builds for arm
This commit is contained in:
parent
2a7d674204
commit
1ba8565909
2 changed files with 30 additions and 8 deletions
32
.github/workflows/docker-image.yml
vendored
32
.github/workflows/docker-image.yml
vendored
|
@ -12,14 +12,36 @@ jobs:
|
|||
steps:
|
||||
- name: Check out the repo
|
||||
uses: actions/checkout@v2
|
||||
- name: Push to GitHub Packages
|
||||
uses: docker/build-push-action@v1
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v4
|
||||
with:
|
||||
images: |
|
||||
ghcr.io/wbrawner/twigs-server
|
||||
tags: |
|
||||
type=schedule
|
||||
type=ref,event=branch
|
||||
type=ref,event=pr
|
||||
type=semver,pattern={{version}}
|
||||
type=semver,pattern={{major}}.{{minor}}
|
||||
type=semver,pattern={{major}}
|
||||
type=sha
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
repository: ${{ github.repository }}/${{ github.event.repository.name }}
|
||||
registry: docker.pkg.github.com
|
||||
tag_with_ref: true
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
- name: Deploy
|
||||
uses: appleboy/ssh-action@master
|
||||
with:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM openjdk:14-jdk as builder
|
||||
FROM openjdk:17-jdk as builder
|
||||
MAINTAINER William Brawner <me@wbrawner.com>
|
||||
|
||||
RUN groupadd --system --gid 1000 gradle \
|
||||
|
@ -8,10 +8,10 @@ COPY --chown=gradle:gradle . /home/gradle/src
|
|||
WORKDIR /home/gradle/src
|
||||
RUN /home/gradle/src/gradlew --console=plain --no-daemon shadowJar
|
||||
|
||||
FROM adoptopenjdk:openj9
|
||||
FROM openjdk:17-slim
|
||||
EXPOSE 8080
|
||||
RUN groupadd --system --gid 1000 twigs \
|
||||
&& useradd --system --gid twigs --uid 1000 --create-home twigs
|
||||
COPY --from=builder --chown=twigs:twigs /home/gradle/src/app/build/libs/twigs.jar twigs.jar
|
||||
USER twigs
|
||||
CMD /opt/java/openjdk/bin/java $JVM_ARGS -jar /twigs.jar
|
||||
CMD /usr/local/openjdk-17/bin/java $JVM_ARGS -jar /twigs.jar
|
||||
|
|
Loading…
Reference in a new issue