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

[RFC] Build multiple-arch base, builder and kepler image #1099

Closed
huoqifeng opened this issue Dec 3, 2023 · 5 comments
Closed

[RFC] Build multiple-arch base, builder and kepler image #1099

huoqifeng opened this issue Dec 3, 2023 · 5 comments
Labels
kind/feature New feature or request

Comments

@huoqifeng
Copy link

huoqifeng commented Dec 3, 2023

What would you like to be added?

Kepler does not have s390x base, builder and kepler image available yet.

Why is this needed?

As we're adding the s390x(IBM System Z) support in function level in #1030, it's time to consider to build the base, builder and kepler image as multi-arch images.

Approach

As obviously the contents in all of the images are different per architecture.

Option 1: architecture specific Dockerfile

I think it's reasonable to use following files to track architecture specific Dockerfile, like:

Dockerfile.bcc.base.amd64 
Dockerfile.bcc.base.s390x
Dockerfile.bcc.base.arm64
...
Dockerfile.bcc.builder.amd64 
Dockerfile.bcc.builder.s390x
Dockerfile.bcc.builder.arm64
...
Dockerfile.bcc.kepler.amd64 
Dockerfile.bcc.kepler.s390x
Dockerfile.bcc.kepler.arm64

We can build architecture specific image and then create the multi-arch images manifest after all arch specific images built/push. Like:

docker buildx imagetools create -t "${manifest}" "${arch_images[@]}"

Option 2: architecture specific install scripts

Alternative is to consider to add a install_base_packages.sh file to handle multiple architectures packages installation in a single Dockerfile file. For example, Using a single Docker file like:

Dockerfile.bcc.base

In the Dockerfile.bcc.base will call

RUN ./install_base_packages.sh

We handle architecture specific algorithm in the file install_base_packages.sh
In file install_base_packages.sh we can do like:

arch=$(uname -m)

if s390x
    handle s390 packages
fi

if amd64
    handle amd64 packages
fi

In this approach, we can use a single buildx command build all architectures images and corresponding manifest. Like:

docker buildx build --platform "${supported_arches}" -f Dockerfile.bcc.base

Similar approach could be done for Dockerfile.bcc.builder and Dockerfile.bcc.kepler.

I'm raising this RFC to discuss the approach...

@huoqifeng huoqifeng added the kind/feature New feature or request label Dec 3, 2023
@huoqifeng
Copy link
Author

@SamYuan1990
Copy link
Collaborator

@rootfs @SamYuan1990 @jichenjc @jiangphcn Idea?

I hope we can have a no GPU based image. Hence or so that, we can have a ubi based image and support all platform without GPU, for example edge computing usage.

btw, @huoqifeng , we are plan to replace bcc by libbpf as ebpf libraray.

@rootfs
Copy link
Contributor

rootfs commented Dec 3, 2023

yes, get a no gpu image is fine to me. @vimalk78 is also refactoring the base image, lets sync on the base image and support matrices in the community meeting

@SamYuan1990
Copy link
Collaborator

yes, get a no gpu image is fine to me. @vimalk78 is also refactoring the base image, lets sync on the base image and support matrices in the community meeting

I will try to attend it tomorrow night my local time. I may have some personal conflicts.

@huoqifeng
Copy link
Author

I'm going to close the issue as which was resolved partially by #1103

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants