func icon indicating copy to clipboard operation
func copied to clipboard

Building containers with func

Open d-m opened this issue 1 year ago • 5 comments

Is it possible to specify the architecture, or build multiple architectures, using func? I'm using an ARM Mac with Podman and would like to also build amd64 images as well.

d-m avatar Mar 08 '24 16:03 d-m

The buildpack build strategy should always build amd64 at this time. The s2i strategy should build for host architecture. You could however force s2i strategy to build for other architecture by specifying builder image --builder={image for the desired arch}.

matejvasek avatar Mar 11 '24 00:03 matejvasek

Also not that build for another architecture will be extremely slow. If architecture of your host machine and cluster differs I recommend on-cluster-build: func deploy --remote ....

matejvasek avatar Mar 11 '24 00:03 matejvasek

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.

github-actions[bot] avatar Jun 09 '24 01:06 github-actions[bot]

Looks like buildpack get confused and create an image with mixed architecture. Image marked as arm64 but contains x86 code.

I using podman 5.1.1 on a Macbook with M3 and func v0.40.0.

When I build a simple go function after func create -l go hello with func build and then inspect the image with podman inspect it says Architechture arm64. When running with func run I get the error rosetta error: failed to open elf at /lib64/ld-linux-x86-64.so.2 which indicates there are x86 code in it.

mrunesson avatar Jun 16 '24 18:06 mrunesson

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.

github-actions[bot] avatar Sep 16 '24 01:09 github-actions[bot]