Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[velocitas-dev] [Velocitas] vehicle-app-cpp-template arm64 docker image build issue
  • From: Eduleen Talledo <Eduleen.Talledo@xxxxxxx>
  • Date: Tue, 25 Jun 2024 12:35:52 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=fpt.com; dmarc=pass action=none header.from=fpt.com; dkim=pass header.d=fpt.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=PBHC0/ljY2mejt5Yq0Nz2DtZbST8nH7bmyAZFDu26vQ=; b=d4xNAeydKm58m5d60qcvlqtK3RE8Uotgrevaek7RLKJKpuGJwMBtV1JjwcizNJezsW5WVPjYkCKi3DMXTgeXiv5lT/CzbadRklfRoCt7ySQD4OoBe23PoiDTSZhfNf5+C3mOublq3OseU/Emoizwo+pfKqoMvOZM2sCVX2JMZ1217abc15stMNgRSLRq1vfBnV4zSOAb8K9315wODvE3UIthl2pO7XO6sg0gp49tIYF0hYfqMSJLEdIMkD/2J+/d3DMnmDEXNtOva64190Ne7uic0vD2YQOeG9ZdieuQPeW8nqEEzhZghUNbYIJiQLL4cIAHcK0Cd2+7nZ8BmonKHA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=edQRGow+xYqVX3W0wVnM4fQeOBGjJFQ1UHX1p2DAH/1ZTk4wLcOfoicZflNRRyVPBdJKFRg7+rZ4ZT7XTjyQjJ09GVMA7BjIoxtNtEbWKaQO/TNJp+oVC9MM0Gr//sNVoyW7NzwXmwmEffVOJRj3z0c+iOe9LZouuQ5nOzYiar6jk17oEFy/ETqkX+S/V0qfdn1V7ZqKBeFTmEAqZpwdG+nD7iM2kLcNUMc8BaHbN4+qN1BycPf1VMPw4NNZLK/VmFXqgkOx8pMCAt3F2JUqrH1O8HiV9z0HqYSPFpnmp1mH8qyloModHerdWL3pGpiJGIbnM2hDzu+vV8hb7BInLA==
  • 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+AOCE2QZ8FnA==
  • Thread-topic: [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


***********************************************************************
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