Skip to content

Commit

Permalink
fix: Shared objects to be dynamically loaded at runtime as needed
Browse files Browse the repository at this point in the history
  • Loading branch information
cjbi committed Jan 26, 2024
1 parent 70c92e7 commit 8233c76
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
*
!target/*-runner
!target/*-runner.jar
!target/*.so
!target/lib/*
!target/quarkus-app/*
!target/quarkus-app/*
32 changes: 32 additions & 0 deletions .github/workflows/so.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Maven CI

on:
push:
branches: [ so ]

jobs:
build-image:
name: Build the docker image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 21
uses: actions/setup-java@v2
with:
java-version: '21'
distribution: 'temurin'
cache: maven
- name: Build Image with Maven
run: |
./mvnw -B -U clean package -Pnative -Dquarkus.container-image.build=true -Dquarkus.container-image.image=cjbi/quarkus-poi-test
docker run cjbi/quarkus-poi-test
- name: Caching Maven Dependencies
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
4 changes: 3 additions & 1 deletion src/main/docker/Dockerfile.native
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ RUN microdnf update && microdnf install freetype fontconfig && microdnf clean al
WORKDIR /work/
RUN chown 1001 /work \
&& chmod "g+rwX" /work \
&& chown 1001:root /work
&& chown 1001:root /work \
# Shared objects to be dynamically loaded at runtime as needed
COPY --chown=1001:root target/*.so /work/
COPY --chown=1001:root target/*-runner /work/application

EXPOSE 8080
Expand Down

0 comments on commit 8233c76

Please sign in to comment.