craumix / jmb-container

A containerized version of https://github.com/jagrosh/MusicBot
MIT License
16 stars 18 forks source link

Does not build for arm64 without changes to Dockerfile #10

Open Outshynd opened 2 weeks ago

Outshynd commented 2 weeks ago

I had to change the first line of the Dockerfile FROM eclipse-temurin:11-jre-alpine to FROM eclipse-temurin:11-jre to get the container to build on arm64. Pretty simple change that I'm documenting here for anyone that wants to use this container with linux/arm64/v8 architechture.

craumix commented 2 weeks ago

There should be some way to use the TARGETARCH build variable to use alpine for amd64 and the default for the remaining architectures. Docker build docs

afwolfe commented 1 week ago

I also build this image for use on arm64, and it looks like eclipse-temurin doesn't provide arm64 alpine binaries for JDK 11: https://github.com/docker-library/official-images/issues/15762

For a multi-platform base image, this project would need to use the Ubuntu 11-jre tag or install Oracle OpenJDK into a generic Alpine base. I submitted a PR to do the latter in #11.