C/C++ Torizon App

Hello. In order to compile my app, I need to download a library (not available in the debian packages), extract it, make it, install it, etc.

I think this can all be done with a RUN entry in the Dockerfile for the build container.

If I develop this app with the Torizon Plugin, is the end-goal to deploy the container with the library used for building the app in it? Am I better to create a container for building the app, then a cleaner container (with just the compiled app) for deploying to Torizon OTA?

Either way, what’s the right way to add the extra RUN statements to the Dockerfile that backs the project? I’m not supposed to edit that directly, correct?

Greetings @kdubious,

It sounds like what you are looking for is described in this article: How to do C/C++ Development on Torizon | Toradex Developer Center

You’ll want to set up what’s called a multi-stage container build. This way you have intermediary container that builds your application and a final container that deploys/executes it. This way your final container doesn’t contain packages and such that were only needed for building.

This is all described more in-depth in the article I referenced.

Best Regards,