gematik / ref-idp-server

Der Gematik IDP-Server dient zur Identifizierung von Versicherten und Leistungserbringenden Organisationen.
Apache License 2.0
22 stars 5 forks source link

Arm64 build support #9

Open tgunsen opened 1 year ago

tgunsen commented 1 year ago

Hello,

Would it be possible to add support for arm64 builds? Currently the docker images are only available as amd64, which decreases the performance on Apple Silicon computers.

Thank you.

RStaeber commented 1 year ago

Hello, as there is no test environment for arm64 here, please feel free to join the project. Pull Requests/Contributions are welcomed.

dotWee commented 1 year ago

I'm experiencing little to none performance issues running the published docker on my Apple Silicon machine.

If you still want to build the docker container with native arm64 arch, you can build the container yourself. The idp-server depends on eclipse-temurin:17.0.4.1_1-jre, which already supports arm64: https://hub.docker.com/layers/library/eclipse-temurin/17.0.4.1_1-jre/images/sha256-56ca01631ce976b22515ca927326db358af461ae02356e264e1e97dbd9f66115?context=explore

Docker will automatically use the arm64 version.

If more help regarding arm64 support is needed, I'll create a pull request with more details.

(running the idp-server locally outside a docker container is easier to debug tho)

dotWee commented 1 year ago

Quick follow-up: To make maven compiling a additional image for arm64 is a two-liner configuration addition to idp-server's pom.xml: https://github.com/dotWee/ref-idp-server/commit/7dbdb3ee79b4ed528f606e405fb526d586da5e56

I'd also suggest making use of GitHub's Action/Workflow tools for an automated docker image release to GitHub Packages and Docker Hub. Checkout this workflow template I've set up a few minutes ago: https://github.com/dotWee/ref-idp-server/blob/master/.github/workflows/maven.yml

Please also consider pushing the "official" docker image to GitHub Packages as alternative Docker Registry, in regards to Docker's latest controversy.