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

Building containers with func #2211

Open
d-m opened this issue Mar 8, 2024 · 5 comments
Open

Building containers with func #2211

d-m opened this issue Mar 8, 2024 · 5 comments
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Comments

@d-m
Copy link

d-m commented Mar 8, 2024

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.

@matejvasek
Copy link
Contributor

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
Copy link
Contributor

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 ....

Copy link
Contributor

github-actions bot commented Jun 9, 2024

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 github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 9, 2024
@mrunesson
Copy link

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.

@github-actions github-actions bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 17, 2024
Copy link
Contributor

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 github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

No branches or pull requests

3 participants