unit icon indicating copy to clipboard operation
unit copied to clipboard

Provide images for alternative architectures (ARM/aarch64, ppc64le)

Open mgiessing opened this issue 4 years ago • 9 comments

Hi, would it be possible to provide container images for alternative CPU architectures such as aarch64, or ppc64le?

I'm able to build these with minimal changes on Power Systems (and would potentially create a PR to support that) but would like to understand what kind of CI toolchain you use in order to understand if that setup supports these architectures.

Thanks!

mgiessing avatar Nov 27 '21 12:11 mgiessing

The code we use as a part of release process to build the images is at https://github.com/nginx/unit/blob/master/pkg/docker/Makefile

I think it can be adapted to use qemu/binfmt_misc to build for aarch64/ppc64le too, and create manifests for the resulting images.

Ref: https://github.com/multiarch/qemu-user-static/blob/master/docs/examples.md or even maybe https://medium.com/@artur.klauser/building-multi-architecture-docker-images-with-buildx-27d80f7e2408 these days.

thresheek avatar Nov 29 '21 08:11 thresheek

And then I'm not sure about the feasibility of ppc64le images from effort to usefulness ratio. aarch64 is another story though, being widely available.

thresheek avatar Nov 29 '21 10:11 thresheek

I'd like to use unit on AWS Graviton2 instances. Could you please make an ARM64 image available?

This would also let people with new M1 Mac's use unit in docker.

robd003 avatar Dec 17 '21 04:12 robd003

Thanks for the comment @robd003 !

We are currently in a process of moving Unit docker images to become official (as in https://github.com/docker-library/official-images/#what-are-official-images) - and we aim to get at least arm64 and ppc64le images published when it's done.

I'll post a link here to track the PR once we have it ready to be submitted.

thresheek avatar Dec 17 '21 08:12 thresheek

Pardon for the ping, but is there somewhere better to track progress on this, or any update on workarounds? Trying to build on my M1 for local dev. Hard to use for app stack otherwise. Thanks

aehlke avatar Aug 10 '22 00:08 aehlke

Facing the same issue here. It'd be great to have the images released for M1.

robjr avatar Aug 30 '22 07:08 robjr

Hi, what i am using on my M1 is:

# clone the repo, just do once, otherwise fetch/pull if you need newer changes
git clone https://github.com/nginx/unit.git

cd pkg/docker

# this builds and tags image as unit:1.26.1-php for example
make build-php

# tag, so it is same as official image
docker tag unit:1.26.1-php docker.io/nginx/unit:1.26.1-php8.1

For more info, explore the makefile.

JanMikes avatar Aug 30 '22 08:08 JanMikes

Hi Folks! Thanks for reaching out. Currently the build of official packages is ongoing.

The build for dev on Mac is valid concern. I will put a detailed and scripted documentation till the packages are ready. Timo

tippexs avatar Aug 30 '22 10:08 tippexs

Hi, what i am using on my M1 is:


# clone the repo, just do once, otherwise fetch/pull if you need newer changes

git clone https://github.com/nginx/unit.git



cd pkg/docker



# this builds and tags image as unit:1.26.1-php for example

make build-php



# tag, so it is same as official image

docker tag unit:1.26.1-php docker.io/nginx/unit:1.26.1-php8.1

For more info, explore the makefile.

Thanks for this!!

tippexs avatar Aug 30 '22 10:08 tippexs