Reading the comments above, it seems there is work going on to setup buildx cluster to build native ARM64 images. Kindly let me know if I can contribute to this activity. I will be happy to help if required.
Okay!! Looks like the MR !1250 (merged) also replaces docker build with buildx with the platform flag.
@mnielsen @WarheadsSE Thank you for the MR merge!!!
Further to our discussion here: < !1246 (comment 1236034902) >, I think we can use --all
flag with skopeo to copy multi-arch images even in skopeo v1.2.2
.
Kindly provide your suggestions for the same.
odidev (ebaa0c75) at 27 Jan 19:45
The build script is currently building all images but only pushing non-UBI docker images.
“docker buildx build
” can’t store multi-arch images locally, so we have to push it with the --push
flag along with docker buildx build
command. This is the reason, I used docker build
for the UBI docker images and “docker buildx build --push
” for all other images.
Kindly let me know if this sounds fine.
I have amended the MR.
Kindly find it here : https://gitlab.com/gitlab-org/build/CNG/-/merge_requests/1246/diffs?diff_id=581304890&start_sha=277193470254ce8a43096523aa97b48d695259a8.
odidev (ebaa0c75) at 19 Jan 05:38
Replace docker build with buildx in the build script.
@mnielsen Yes, I amended my MR. Kindly find it here: !1246 (diffs).
I initialized BUILD_TYPE
to "buildx build --push
" for non-UBI images and "build
" for the UBI images, and then called "docker $BUILD_TYPE ...
" to avoid repetition.
Also, I removed the skopeo part from the MR.
Does this look good?
@mnielsen, Thank you for the suggestions. I have amended the MR as per your reviews. Kindly have a look.
odidev (27719347) at 12 Jan 07:02
Replace docker build with buildx in the build script.
@twk3 I have raised the MR. Kindly find it here: < gitlab-org/build/CNG!1246 (merged) >.
Replace docker build with buildx in the build script.
See Definition of done.
For anything in this list which will not be completed, please provide a reason in the MR discussion
odidev (a12eea1d) at 05 Jan 05:32
Replace docker build with buildx in the build script and use skopeo...
... and 8 more commits
Hi Team, can you please review the commit shared above?
odidev (84b05a88) at 28 Dec 17:22
I have added an echo in the loop to print the source and the destination of the images.
Kindly review the change here: < https://gitlab.com/gitlab-org/build/CNG/-/merge_requests/1239/diffs?diff_id=566061001&start_sha=29965684a859f1fec2e486fe64c02579ae57e20d >.
For the second task, I.e. for docker tag and push, I replaced it with skopeo
since docker tag
won't find the images locally as we have already pushed them to the registry using buildx.
Kindly review and suggest if skopeo seems to be a good replacement in our use case.
Please find my commit here: < odidev/CNG@cbe0c836 >.
odidev (cbe0c836) at 28 Dec 06:55
Replace docker build with buildx in the build script and use skopeo...
odidev (69eeffeb) at 28 Dec 06:35
Replace docker build with buildx in the build script and use skopeo...
odidev (84b05a88) at 28 Dec 05:51
Use skopeo to pull, tag and push multi-arch images in one command.