-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Kaniko excecutor is wrongly tagging the architecture metadata on ARM image. #1587
Comments
as mentioned in the related #786 and #1526, I added
I also tried to use an ARM64 runner on AWS, but my pipeline fails because of /bin/sh dotnet on ARM
|
Also related is the missing support of pushing manifest #1550 Recent build 1.4 and 1.5 are not yet available on Google image registry |
so what is the recommended approach to build and target ARM64 images? A) use the standard gcr.io/kaniko-project/executor:debug on AMD/Intel runners and expect them to tag properly ARM64 images ? |
I edited the initial message and title since the issue here is really only about tagging the metadata. My current work around is to still have the docker pull/push commands for my ARM64 target, waiting for a proper fix with Kaniko |
any news for building ARM64 images with Kaniko? |
@tejal29 Are you guys planning to fix this any time soon? |
I've done some tests and by adding the flag: |
does edit: seems to be a full replacement. However, the docs says:
This is a is a bit misleading since |
I used something like this locally:
IMO, both are needed. By only using |
It is different. The builds arg will make the binaries compatible with Arm
or other architecture requested.
Custom platform will download the base image for the architecture in
parameters and put architecture metadata in the output image as per the
parameter.
…On Thu, 2 Sep 2021, 15:59 Eric, ***@***.***> wrote:
does
--customPlatform=linux/arm64/v8
replace or is additional to
--build-arg opts="CGO_ENABLED=0 GOARCH=$ARCH"
?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1587 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEWXDHPUEISSHF5M5DT3WSLT74VEVANCNFSM4XZ5CWYA>
.
|
is giving me good results and therefore I can close the issue. |
I am working on an dockerized service built for both ARM64 and AMD64 devices.
My Gitlab pipeline is thus creating 2 separated images, one for each architecture.
My service is a dotnet core (3.1) component.
My dockerfile only specifies the base image (linux alpine) and copy my .NET lib on it:
The base image is Linux Alpine 3.13, either the x86_64 one for AMD target or the aarch64 one for ARM64 target.
The build step is also using the $DOTNET_RUNTIME. either linux-musl-x64 or linux-musl-arm64:
RUN dotnet publish myServiceHost.csproj -c Release -o out -r $DOTNET_RUNTIME --self-contained true
as from my gitlab script:
My build stage is using gcr.io/kaniko-project/executor:debug as requested by Gitlab.
The Gitlab pipeline is using AWS runners, on AMD/Intel machines.
Kaniko properly create the target images: on my ARM device, the service is a fully ARM image with ARM binaries.
BUT the metadata are wrong, and thus causing many isssue with Docker Swarm
# docker image inspect <my-image-id> | grep "Architecture"
"Architecture": "amd64",
It should be ARM64 !
If I enter the running with
# docker exec -it <container-id> sh
and then
# uname -a
it reads aarch64, as defined in the base Alpine image.
BEFORE moving to Kaniko, my pipeline was using docker pull/push commands, also using AMD/Intel AWS runners.
ARM image built through docker push command is still tagged as ARM64 architecture.
The issue here is only the Kaniko Excecutor overwriting the architecture metadata of the final image.
How is kaniko setting the "Architecture" tag of the docker image ?
Is it related to the runner used to build it?
Or which parameters do I need in my kaniko script to set it to ARM64 ?
The issue is likely related to #786 and #1526
The text was updated successfully, but these errors were encountered: