Skip to content

Commit

Permalink
docs(ct-base): add notes about multiarch builds IQSS#8932
Browse files Browse the repository at this point in the history
Addin description on requirements to build cross platform
added as subsection of the build instructions seemed valuable.
  • Loading branch information
poikilotherm committed Sep 19, 2022
1 parent 4dfbb28 commit 21b91f1
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions doc/sphinx-guides/source/container/base-image.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,22 @@ its sources plus uncached scheduled nightly builds to make sure security updates
*Note:* For the Github Action to be able to push to Docker Hub, two repository secrets
(DOCKERHUB_USERNAME, DOCKERHUB_TOKEN) have been added by IQSS admins to their repository.

Processor Architecture and Multiarch
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Using Maven Docker Plugin's *BuildX* mode, the base container image provides support for multiple CPU architectures
from the same image.

Building the image via ``mvn -Pct package`` or ``mvn -Pct install`` as above will only build for the architecture of
the Docker maschine's CPU.

Only ``mvn -Pct deploy`` will trigger building on all enabled architectures (which are AMD64 and ARM64 at this time).
Yet, to enable building with non-native code on your build machine, you will need to setup a cross-platform builder.

On Linux, you should install `qemu-user-static <https://github.com/multiarch/qemu-user-static>`__ (preferably via
your package management) on the host and run ``docker run --rm --privileged multiarch/qemu-user-static --reset -p yes``
to enable that builder. The Docker plugin will setup everything else for you.



Tunables
Expand Down Expand Up @@ -290,8 +306,6 @@ you can read about those in a few places like https://developers.redhat.com/arti
https://www.eclipse.org/openj9/docs/xxusecontainersupport, etc. The other memory defaults are inspired
from `run-java-sh recommendations`_.

*Note: the build process used the newer ``buildx`` feature of Docker to provide multiarch images.*



.. _Pre/postboot script docs: https://docs.payara.fish/community/docs/Technical%20Documentation/Payara%20Micro%20Documentation/Payara%20Micro%20Configuration%20and%20Management/Micro%20Management/Asadmin%20Commands/Pre%20and%20Post%20Boot%20Commands.html
Expand Down

0 comments on commit 21b91f1

Please sign in to comment.