Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [velocitas-dev] [Velocitas] vehicle-app-cpp-template arm64 docker image build issue
  • From: "Jaegervall Erik (XC/EEX-SE)" <Erik.Jaegervall@xxxxxxxxxxxx>
  • Date: Fri, 28 Jun 2024 11:36:45 +0000
  • Accept-language: sv-SE, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=se.bosch.com; dmarc=pass action=none header.from=se.bosch.com; dkim=pass header.d=se.bosch.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=7TpR1c40K95iR5aVv1odiX2r1/1fLS4Hgo/er1xPPGw=; b=GRGyfq9FE9+ujzQD6LDthDcw4ETiO5XRIHTZZuiIqjCOj/vbUhY/gy/bb/P+0yvVYP3s3dPcN8+KAUNReGX7qBPbp7tVS9mcQ5ADJJpOv1XtPBRgAzpHEDvdj8QgOhEyHuKK+NBj0jh1D3uBGYeS9ohe6XKzfjSTYBbo9UYl6ObFgg+bDWoHFNVb1CllyqeoZ/Vt4lqi0rFu4giMBRFvhz+X2MpKEXa6j3aLYVuACc/AYbfJKveCDl68B9oSSQfyLxqeE2JLH3q3Rn1W+yPuIXRTUIYIvpl6TxVebfXJD/O5/9o7JM2Fvk3KLBDpAWls/GeYA1lIO3Z5i7gzx/gdmg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e8rAUtILv6y8SlIUNiR1Kct4ihBxSUj+A6NBCJNm/SFgxY9w/fnmTkYFqilFX/E2yUK3igVBZ84TdraBrvfQpAf81GJnXevB1vwuKHhh0ozp9ZSpRBLfboLwRyA7sLom+4fZbyIN/98Gt8/HIZic7YvFNI4ZIvCl7A3GHHt4QeLDSn6sSmbodJzIwhjWyyMGcvj5Jv4LnnbRiXwgYa7N1ls4h1xwqm8fCTR9wn9qLsHO6DlnuxFM1OkIzfGzL/XVP7/SEqgFQolHZ8A4uEPQ5k23qyOslxPuEBwZEhRScz49a0ezxArXaR+PH0BiXP9T+sSEvCC9fzpJt8gr+FnBfA==
  • Delivered-to: velocitas-dev@xxxxxxxxxxx
  • List-archive: <https://www.eclipse.org/mailman/private/velocitas-dev/>
  • List-help: <mailto:velocitas-dev-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/velocitas-dev>, <mailto:velocitas-dev-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/velocitas-dev>, <mailto:velocitas-dev-request@eclipse.org?subject=unsubscribe>
  • Msip_labels:
  • Thread-index: AQHaxsXTru+91zb8F0+AOCE2QZ8FnLHZySvwgANF5vA=
  • Thread-topic: [Velocitas] vehicle-app-cpp-template arm64 docker image build issue

Hi Again!

 

I did some more tests and it seems that the proposed changes should not be necessary if using the “—platform” argument like below. Then it should not be needed to specify “—platform” in the Dockerfile as it will be inherited. (You might need to install qemu-user-static depending on your distribution) . I also did not experience any problems using “scratch” in the last step, so for now my conclusion is that no change is needed

 

docker build -f app/Dockerfile --progress=plain --platform=linux/arm64 -t ex5:latest .

 

I did however create an issue at https://github.com/eclipse-velocitas/vehicle-app-cpp-template/issues/107 to discuss if we should document cross compilation better. If you have further concerns or problems with cross compilation feel free to add an issue at https://github.com/eclipse-velocitas/vehicle-app-cpp-template/issues, and/or join the next Velocitas Developer Meeting.

 

 

Med vänlig hälsning / Best regards,

Erik Jaegervall
XC/EEX-SE


Tel. +46 46 270-6821 | Mobile +46 70 420-1721

From: velocitas-dev <velocitas-dev-bounces@xxxxxxxxxxx> On Behalf Of Jaegervall Erik (XC/EEX-SE) via velocitas-dev
Sent: Wednesday, June 26, 2024 11:35 AM
To: velocitas developer discussions <velocitas-dev@xxxxxxxxxxx>
Cc: Jaegervall Erik (XC/EEX-SE) <Erik.Jaegervall@xxxxxxxxxxxx>; Son Dao Thanh <SonDT1@xxxxxxx>; Khang Diep Chi <KhangDC1@xxxxxxx>
Subject: Re: [velocitas-dev] [Velocitas] vehicle-app-cpp-template arm64 docker image build issue

 

Thank you for the mail!

 

We will look further into it and come back with a more detailed answer after analysis. You are also welcome to join the next Velocitas/Kuksa developer meeting (see https://github.com/eclipse-velocitas/velocitas-docs/wiki/Developer-Meetup(s)) if you need more support or want to discuss the topic further.

 

Med vänlig hälsning / Best regards,

Erik Jaegervall
XC/EEX-SE


Tel.
+46 46 270-6821 | Mobile +46 70 420-1721

From: velocitas-dev <velocitas-dev-bounces@xxxxxxxxxxx> On Behalf Of Eduleen Talledo via velocitas-dev
Sent: Tuesday, June 25, 2024 2:36 PM
To: velocitas-dev@xxxxxxxxxxx
Cc: Eduleen Talledo <Eduleen.Talledo@xxxxxxx>; Son Dao Thanh <SonDT1@xxxxxxx>; Khang Diep Chi <KhangDC1@xxxxxxx>
Subject: [velocitas-dev] [Velocitas] vehicle-app-cpp-template arm64 docker image build issue

 

Hi Velocitas-dev Team,

 

We found a maybe a minor issue in the Dockerfile when building it for arm64 machines.

 

Background:

We are creating a POC using the vehicle-app-cpp-template.

Everything worked great when we built the docker images in our host machine (amd64) and deployed it in ubuntu test machine (amd64).

However, when we built the docker image for arm64 and still using our host machine (amd64) and to be deployed in our edge devices (arm64).

The final image is still in amd64.

 

This is how docker build the apps:

$ cd vehicle-app-cpp-template/app

$ docker build -f app/Dockerfile --progress=plain --build-arg TARGETPLATFORM=linux/arm64 -t localhost:12345/app-seat-adjuster:0.0.1 .

 

After building it we docker image inspect the docker image.: 

$ docker image inspect localhost:12345/app-seat-adjuster:0.0.1 | grep Arch

$ "Architecture": "amd64",

 

We fixed it by modifying cd vehicle-app-cpp-template/app/Dockerfile.

# FROM ghcr.io/eclipse-velocitas/devcontainer-base-images/cpp:v0.3 as builder
FROM --platform=$TARGETPLATFORM ghcr.io/eclipse-velocitas/devcontainer-base-images/cpp:v0.3 as builder

and

# FROM --platform=$TARGETPLATFORM scratch as runner
FROM --platform=$TARGETPLATFORM gcr.io/distroless/base-debian12 as runner

 

Note:

·                     We did not use scratch since it will still default to linux/amd64 even supplying --platform=linux/arm64


After this minor fix. We can now successfully deploy it with our edge devices (arm64).

 

Does our Dockerfile changes is correct way to go forward or do you recommend another way to build docker(arm64) images using host(amd64)?

 

Your response is highly appreciated.

 

Thank you, 

 EDULEEN TALLEDO (Mr.)

 Software Development Engineer

 FPT Automotive -- Philippines

 IT Park, Cebu City, Philippines 6000

 Mobile: +63 960-2430-526 | +84 379-488-928

 Email: eduleen.talledo@xxxxxxx

 


***********************************************************************
IMPORTANT NOTICE
This email may contain confidential and/ or privileged information that belongs to FPT Software. If you are not the intended recipient or might have received this email by accident from an unreliable source, please notify the sender from FPT Software immediately and destroy this email. Keep in mind that any unauthorized copying, editing, disclosure or distribution of the material in this email is strictly forbidden, plus against the law by which FPT Software and involved clients abide.


Back to the top