-
Notifications
You must be signed in to change notification settings - Fork 4
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
Use correct targetplatform #104
Use correct targetplatform #104
Conversation
.devcontainer/Dockerfile
Outdated
@@ -1,3 +1,4 @@ | |||
# This file is maintained by velocitas CLI, do not modify manually. Change settings in .velocitas.json |
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.
This is needed to make CI happy, fails also on main currently, same for license checks
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.
Yes with the new version of the cli (Which is part of the new base image) this dockerfile is maintained through our devcontainer-setup. We forgot to update the versions inside velocitas.json (Just for information, the approach is -> Starting the template in devcontainer and execute: velocitas upgrade --ignore-bounds && velocitas init && velocitas sync). Shall i create a seperate PR which is doing it instead of putting this inside this PR?
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.
Doesn't really matter for me, if you want to fix it in a separate PR I can later rebase on that PR.
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.
created a PR
#106
@@ -14,7 +14,7 @@ | |||
|
|||
# syntax = docker/dockerfile:1.2 | |||
|
|||
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 |
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 managed to get things running for arm without changing "scratch" or adding "--platform" there. It anyway only copy things right, so this should maybe be sufficient.
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.
do you have an arm device? otherwise I would assume doing it like this still requires qemu.
so what I would suggest is to properly use cross compilation (-x )
Please have a look on if this seems reasonable. There are a lot of items in the checklist which I do not really know when they are useful. Like when do we actually want to check that "Vehicle App can be deployed to local Kanto runtime and is running". No checks removed so far |
Fixes #105 |
Based on mail on velocitas-dev Similar setup in https://github.com/eclipse-velocitas/vehicle-app-python-template/blob/main/app/Dockerfile
Converted to draft, PR might not be needed |
Closing this one, with right arguments no change seems to be needed, see #107 |
Based on mail on velocitas-dev (see below)
Similar setup already used in
https://github.com/eclipse-velocitas/vehicle-app-python-template/blob/main/app/Dockerfile
When testing with
--platform=linux/arm64
I did not notice any problems usingscratch
in the last step, and for scratch platform should not matter right, it just copies what we have from previous step, or?FROM --platform=$TARGETPLATFORM gcr.io/distroless/base-debian12 as runner
Tests performed
Built locally with platform flag on a Debian VM for arm64
Original mail