Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Scratchcat1
Copy link
Contributor

@Scratchcat1 Scratchcat1 commented Mar 14, 2022

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:

  • Select the right cpu arch version when downloading java
  • Replace the java install in the Dockerfile with a call to set_java_ver
  • README updated on how to build these images

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".

Note: This depends on the image nimmis/ubuntu being rebuilt with multiarch support

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:
- Select the right cpu arch version when downloading java
- Replace the java install in the Dockerfile with a call to set_java_ver
- README updated on how to build these images
- libatomic1 is a depencency for Java on armv7 but not amd64.
- Installing Java early while performing a multi-arch build results in Java
for the host CPU being installed rather than the correct architecture
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant