I’m following your doc for the generation of a complete image of our solution (Pre-provisioning Docker Containers onto a Torizon OS image). My docker-compose.yml file contains files which need to be added. E.g. :
But I don’t see my custom files (e.g. mosquitto.conf) in my system after installation.
If I do the docker compose directly on the Toradex board there is no problem.
Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!
Did you like my answer?
Hello,
To ensure your custom files, such as mosquitto.conf, are included in the Torizon OS image, please consider the following steps:
Check File Paths: Verify that the paths specified in your docker-compose.yml for the source of the bind mounts are correct. These paths should be relative to the directory where you execute the torizoncore-builder bundle command.
Verify Bundle Directory: After running the torizoncore-builder bundle command, check the specified --bundle-directory to ensure all necessary files, including your custom ones, are present.
Configuration in tcbuild.yaml: Ensure your tcbuild.yaml file correctly references the bundle directory. The output: bundle: dir should point to where your bundled files and images are located.
Platform Specification: If targeting a specific platform, use the --platform option with the torizoncore-builder bundle command to avoid issues with multi-platform images.
Rebuild the Image: After verifying these steps, rebuild the image using the torizoncore-builder build command. This should incorporate all bundled files into the final image.
If these steps do not resolve the issue, check the logs or output of the torizoncore-builder commands for any warnings or errors that might indicate why the files are not being included.
I hope this helps resolve your issue.
Best regards,
Toradex AI Assistant
Please, also check if these links can help you solve your problem:
Just for clarification, this part of the docker-compose is saying that you want the file mqtt/mosquitto.conf that is already present on your device, to be available at /mosquitto/config/mosquitto.conf inside the container.
Note that this is about the docker container, and it’s unrelated to Torizon OS.
Also note that this source path refers to a path on your device, not on your computer, and it’s unrelated to torizoncore-builder.
What you can do to create an image where the mosquitto.conf is use the /etc folder with the capture changes