I am trying to build and deploy a CPP application (written for a linux envirionment) on Toradex Apalis iMX8QM board with Torizoncore. I use visual studio 2019 as my development environment. My application uses openssl and zlib libraries. I get the following errors while building:
**error : openssl/ssl.h: No such file or directory
error : zlib.h: No such file or directory**
The container that starts running in the build environment is: arm64v8-debian-base_buster_2a0fe2f5-cc3f-4788-a3c9-58900e05f974_debug_sdk based on the image: arm64v8-debian-base_buster_2a0fe2f5-cc3f-4788-a3c9-58900e05f974_debug_sdk_image. (Listed from the commands docker ps and docker images respectively). I can step into the running container using the command docker exec -it CONTAINER ID /bin/bash and see that the build folder is created at location /home.
I could customize the container by installing all the development packages that I need (openssl and zlib). However, note that it did not simply work with apt-get install openssl and apt-get install zlib1g-dev. I had to download the source files and do make install (it takes a lot of time!!). Then my problem is solved temporarily and I can execute my application. But I don’t want to do this every time I want to test my application since a new container is started every time and installing these libraries each time will take a lot of time.
So I built a new image from the running container (using docker commit) with the libraries that I need (basically the arm64v8-debian-base_buster_debug_######_sdk container with the openssl and zlib libraries that I installed), and pushed this image into docker hub. Next thing, I changed the name of the image in C:\lokal\rudhi\torizonCPP\MyProject\appconfig_0\work\Dockerfile.debug to the name of the new image that I just pushed. Changing the Dockerfile does not seem to be the right solution as far as I understand, because it is still building a new debian-base_buster container in the build environment instead of a container from my newly built image.
I do not understand what Dockerfile_SDK.debug file is and if I need to change something in there. I am a newbie to docker. What would be a permanent solution to my problem? I need my application to run in a container with all the libraries and packages that I need and I don’t want to configure the containers every single time. Also, how do I install the runtime libraries for these on the container running on Toradex’s Computer on Modules (and will I have to do this every time I turn on the module)?