Skip to content
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

Build instructions outdated #26

Closed
SebastianSchildt opened this issue Jun 26, 2024 · 0 comments · Fixed by #27
Closed

Build instructions outdated #26

SebastianSchildt opened this issue Jun 26, 2024 · 0 comments · Fixed by #27

Comments

@SebastianSchildt
Copy link
Contributor

SebastianSchildt commented Jun 26, 2024

I think the readme does not show the correct way to build the container. This is a normal buildx capable Dockerfile.

Also I think the build shell script is sort of redundant and not used anywhere

Copy from mailinglist

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 kuksa-can-provider
$ docker build -f Dockerfile --progress=plain --build-arg TARGETPLATFORM=linux/arm64 -t localhost:12345/feeder-can:0.4.3 .

After building it we docker image inspect the docker image.: 
$ docker image inspect localhost:12345/feeder-can:0.4.3 | grep Arch
$ "Architecture": "amd64",

We fixed it by modifying cd kuksa-can-provider/Dockerfile.
# FROM gcr.io/distroless/base-debian12
FROM --platform=$TARGETPLATFORM gcr.io/distroless/base-debian12
and

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

Does our Dockerfile changes is the correct way to go forward or do you recommend another way to build docker(arm64) images using host(amd64)?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant