-
Notifications
You must be signed in to change notification settings - Fork 517
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 multiarch docker image: amd, s390x #251
Building multiarch docker image: amd, s390x #251
Conversation
@jhump could you please check and let me know your comments? Thank you! |
@jhump Could you please have a look? |
I like the idea. This could also be used to resolve #234. However, I have no access to hardware for these platforms, so I do not know how I could test the images. That makes me nervous in supporting them. I know the same argument could be made of the compiled binaries in the GitHub release artifacts, which I have included (even for platforms on which I can't test). I guess I trust Go cross-compilation results, having used them a lot. However, I have never used multi-arch support in Docker, and it's even marked as an "experimental" feature. So I guess I'm not as trusting. Do you have a proposal for how I could verify these images? |
@jhump Thank you for your feedback. We do understand your concern, however, many repositories have enabled buildx for generating multi-arch images now(some of them enabled by our team) - kubernetes , jaeger , kubernetes-csi amongst the few I can quickly list here. Regarding the hardware access to test images, we can provide s390x VMs to you to validate the images at your end. |
rm VERSION | ||
|
||
# Enable qemu and binfmt support | ||
$PREFIX docker run --privileged --rm tonistiigi/binfmt:qemu-v6.1.0 --install all |
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.
What is this for? Does this install something on the host that is needed for the buildx
stuff below? If so, maybe elaborate in the comment above.
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.
Updated the comment, Also had missed earlier to mention about buildx added in docker 19.03 onward. Updated the same.
releasing/do-release.sh
Outdated
$PREFIX docker push "fullstorydev/grpcurl:${VERSION}" | ||
$PREFIX docker tag "fullstorydev/grpcurl:${VERSION}" fullstorydev/grpcurl:latest | ||
$PREFIX docker push fullstorydev/grpcurl:latest | ||
$PREFIX docker buildx build --platform linux/amd64,linux/s390x --tag fullstorydev/grpcurl:${VERSION} --tag fullstorydev/grpcurl:latest --push --progress plain --no-cache . |
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.
Let's add linux/arm64
, too, to resolve #234.
BTW, I don't have any experience using multi-platform docker images. Since this statement uses tags like latest
and ${VERSION}
, I guess the platform does not need to be part of the tag, and that Docker hub (or other image registries) has a separate way of partitioning images for different platforms?
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.
Let's add linux/arm64, too, to resolve #234.
I have added arm64, it should work, however please note that I do not have access to verify image on arm. Someone using arm can help us validate. I have verified the images on amd and s390x so far.
Also please note that 'go build' step takes higher time for arm and s390x than amd as of now. Hopefully it will improve in future releases.
BTW, I don't have any experience using multi-platform docker images. Since this statement uses tags like latest and ${VERSION}, I guess the platform does not need to be part of the tag, and that Docker hub (or other image registries) has a separate way of partitioning images for different platforms?
That's right, docker uses manifest lists for a set of platforms and pulls the correct image based on where it is running. This describes it well.
I have kept the same image names and tags (latest and $VERSION), this will ensure existing amd users are not affected!
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.
I will see if @pquerna can test an ARM image when I build and push one (that's who requested ARM support in docker).
Thanks @jhump for your support! |
@namrata-ibm, I'm having problems with this stuff. I'm trying to make a release. The first run failed (a flaky error during the
I don't know any of this toolchain (which is another reason I was initially hesitant to accept a patch like this). Can you please advise ASAP? |
I think this fixes my problem: #264 I've played around with, using If you know of a better solution, please let me know. |
Ugh, another botched release. It looks like I simply cannot build this for s390x. Apparently it's an issue in qemu on OS X. The work-around I've seen is to use So I'm afraid I am reverting part of this pull request, removing support for s390x for the docker images that get pushed. The next release will still have published binaries for s390x. But if you want official docker images, I'll need more help in a workable solution. |
@jhump apologies for the late response.. time zone difference!
Above looks good. About build for s390x, I tried to run the
Could you please give some details on the error faced? |
In my last message, I pointed out that it fails on OS X. Sorry I that I forgot to put a link to the actual issue I'm running into in my previous comment. Here it is: I thought the error was flaky, like a TLS issue with the |
@jhump Could you please share details about your system(model/year) to see if I can reproduce it? |
I'm using a mid-2015 Macbook Pro, 15", with OS X 10.14.6 (Mojave). The bug report I posted above suggests it is related to OS X. It may only be Intel-chip Macbooks (so maybe this not an issue for newer ones that use M1 chips?). |
This PR aims at building and pushing multi-arch image on docker hub.
New architectures can be easily added to the platforms to generate manifests for others.