-
Notifications
You must be signed in to change notification settings - Fork 69
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
Update Makefile and image tags #23
Conversation
/cc @djlwilder |
Following up from the conversation with @caseydavenport on projectcalico/bird#52 : This is restructured to build on We could try to do cross-build here too, but it is slightly more complex, since it isn't just one build, but rather a whole series of Thoughts? |
/cc @tomdee at the request of @caseydavenport |
8688c2a
to
1a76783
Compare
There was an error in the @caseydavenport and @tomdee what can I do next here to move it up? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes themselves look fine.
Since most developers and CI systems run amd64 it would be nice if the whole build/release process can run from an amd64 host. For the There are also going to be problems with the patched version of goveralls and the glibc install (which isn't multiarch). |
Yeah, it is a problem. I know some CI providers are looking seriously at arm64, but nothing there yet.
That was the approach we took with bird multi-arch. It was hard to do the gcc part and get it right, but it did work in the end.
Please do point a link to where you did it? I have played around with
@tomdee since this looks good to you and approved, can we merge this in as, "able to build for different platforms, each on its own hardware," and then I can open a new PR for building everything from amd64? |
@deitch I think this was the build that @tomdee was talking about: https://github.com/coreos/flannel/search?utf8=%E2%9C%93&q=qemu&type= Looks like he mounts in the qemu binary from the host. I've tried doing cross-arch builds for raspberry pi that way on my own project and it seems to work great. Of course, if you hit an instruction that's not supported (as it looks like @tomdee mentioned above) then it'll suddenly go from "great" to "broken"! |
Best as I can tell, there are 2 distinct stages: cross-build (or cross-compile, if you prefer), and cross-image. Cross-compile appears to do what you said, which is mount
Does it then rely on The cross-image actually copies qemu into the image? See here Well, one step at a time, I guess. |
I am going to open a tracking issue for cross-build |
Does the following:
Makefile
so a single make target "does the right thing" on any platform (but can be overridden)README.md
describing how it can be built and pushedamd64
With the above, you end up with a single repo
calico/go-build
, but with tags per architecture. For example,calico/go-build:latest-amd64
andcalico/go-build:latest-arm64
.The above is the simplest way to manage it, and is how many of the official library images are built (as well as just about everything build by docker themselves, including linuxkit images).
More importantly, it removes "repository bloat", and makes it easy to move to a single multi-architecture manifest.
It also adds a default for
amd64
, so that anything that uses it as a default continues to work. Of course, with multi-architecture (if/when adopted by project calico), all of that goes away, since you can just dodocker pull calico/go-build
on any architecture, and it automatically pulls the right one.