arm64 docker image?
Opened this issue · 3 comments
Hello,
is it possible to provide a multi-architecture docker image. I'm looking for a docker image for arm64 architecture of geoserver.
Best regards,
Martin
Just jumping in here with some pointers to what needs to be done, but don't have the time to do the work...
Currently, the build script has support for 3 versions of Docker (18
, 19
, 20
):
docker-geoserver/custom_build.sh
Lines 144 to 218 in 999c0ba
Moby BuildKit and docker buildx
, which together allow seamless cross-platform builds, are enabled by default only as of Docker v23.
However, using the DOCKER_BUILDKIT=1
env var, one can opt into BuildKit even with earlier versions of Docker. It seems like, as of Docker Engine 18.06.0-ce
, released on 2018-07-18, one can opt into experimental BuildKit.
TLDR: Theoretically, building linux/arm64
images should be possible even with the current setup, with the addition of --platform linux/amd64,linux/arm64
and DOCKER_BUILDKIT=1
.
Hi @spinnaker1
Thanks for reporting this. It would be nice to have arm64 builds as well. I have not looked into this yet
If you want to have a go at it, the builds are executed by the docker hub itself based on these hook scripts in the root of the repository
https://github.com/geosolutions-it/docker-geoserver/tree/master/hooks
@derhuerst the custom_build script is a helper script for end users to make it easier for them to create a custom image but is not used by the CI in docker hub to build and push the images
To add arm builds the build and push script need an update
here: https://github.com/geosolutions-it/docker-geoserver/blob/master/hooks/build#L28
and
here: https://github.com/geosolutions-it/docker-geoserver/blob/master/hooks/build#L51
with an extra build command and dedicated tag for ARM
and then push commands to be added here: https://github.com/geosolutions-it/docker-geoserver/blob/master/hooks/push#L5-L21 to push the new tags
Finally the test part with the new tags
https://github.com/geosolutions-it/docker-geoserver/blob/master/hooks/test#L3-L11
with an extra build command and dedicated tag for ARM
I think having one tag with both linux/amd64
& linux/arm64
support would provide more value. (But this should not be a problem if the Docker Hub build environment supports docker buildx
, which I assume it does.)
With two separate tags, it is not possible to e.g. write architecture-agnostic Compose files.