build icon indicating copy to clipboard operation
build copied to clipboard

Fix build rules for image.mk

Open tamalsaha opened this issue 2 years ago • 7 comments

Description of your changes

We are not using xpkg instead using the img.mk build rules to package our images. This pr makes the minimal changes to fix the build rules and build multi-arch image using docker manifest command.

Fixes #

I have:

  • [x] Read and followed Upbound's contribution process.
  • [x] Run make reviewable to ensure this PR is ready for review.
  • [x] Added backport release-x.y labels to auto-backport this PR, as appropriate.

How has this code been tested

I was able to use my fork to build and publish images

https://github.com/kubeform/provider-gcp/actions/runs/5395921949/jobs/9798952056

tamalsaha avatar Jun 27 '23 23:06 tamalsaha

Thanks for your contribution. Could you please share a bit more details why manifest-tool got replaced with docker manifest? The later is marked experimental, is there any issues with manifest-tool?

pedjak avatar Jul 04 '23 13:07 pedjak

manifest-tool command did not work on Mac M1 laptops. docker manifest command has existed since 2018. I don't know why it is still marked as experimental but this is pretty much what everyone uses these days since it is part of the docker already. You can see the history of the commands here: https://github.com/estesp/manifest-tool#history

Usage in k/k:

https://github.com/kubernetes/kubernetes/blob/master/build/pause/Makefile#L83

tamalsaha avatar Jul 05 '23 01:07 tamalsaha

Would it be possible to share some more details here @tamalsaha on why manifest-tool didn't work on M1 laptops? What was the error you saw and how can you reproduce it? a lot of us have M1 laptops as well and haven't seen an issue when building ourselves, so understanding the root cause here would be helpful :)

jbw976 avatar Jul 05 '23 09:07 jbw976

There is no darwin-arm64 version offered by the manifest-tools project. https://github.com/estesp/manifest-tool/releases/tag/v1.0.3

So, curl failed.

tamalsaha avatar Jul 05 '23 10:07 tamalsaha

Thank you - any further details you can provide about how to reproduce this though? would you be able to fill out details in the "How has this code been tested" section of the PR body?

jbw976 avatar Jul 05 '23 11:07 jbw976

any further details you can provide about how to reproduce this though?

Just try from any Mac M1 laptop.

How has this code been tested

Done!

tamalsaha avatar Jul 05 '23 11:07 tamalsaha

Just try from any Mac M1 laptop

Try what exactly? 😇 I'm hoping you can share more precise repro steps here, e.g. the specific commands to run to repro this and where to run them from. Thank you! 🙏

jbw976 avatar Jul 06 '23 10:07 jbw976