nimmis / docker-spigot

A docker container with spigot, builds spigot.jar on first start
175 stars 82 forks source link

Support multiarch builds to run on other architectures e.g. Raspberry Pi #58

Open Scratchcat1 opened 2 years ago

Scratchcat1 commented 2 years ago

Note: This depends on the image nimmis/ubuntu being rebuilt with multiarch support. I've tested that it can build but not if it runs.

This uses docker buildx and manifest lists to build a multiple versions of an image for different systems which appear as a single image on the docker hub. This allows clients to select the right version automatically.

Changes:

Possible problems: I can't quite test this without your ubuntu image being multiarch but my fork which depends on debian allows the server to run on a 32 bit Raspberry Pi.

Java install in the docker file only is affected by the major version variable now. I don't know if the minor versions are necessary. Otherwise not installing java during the build also works as the client can download a copy.

The architecture aarch64 isn't tested as I don't have access to a machine to see the lscpu output. It seems like it should output "armv8".