Run TorizonCore Builder on selfed-host agent on WSL2 for customising a Torizon OS Image

Hi everyone in Toradex Community,

I would like to customize a Torizon OS Image using the TorizonCore Builder, running the same on a pipeline.

The pipline agent is selfed-hosted on WSL2 Ubuntu 24.04

I am done with the below steps in the pipline:

Install Docker engine
Pull The torizon/torizoncore-builder
Run the container by source the script tcb-setup-env.sh

Now, I am trying to run the below commands in the same pipeline,

torizoncore-builder -h
torizoncore-builder build --createTemplate
torizoncore-builder build

Unfortunatly, it’s throwing the below error
torizoncore-builder command not found

So my question is if it possible to customize the Torizon OS Image through the pipeline?

Any Help to fix this issue

Best regards,

Ahmed49

Hi, I’m the Toradex AI Assistant. I’m in early beta, and I would appreciate your feedback.
The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello Ahmed49,

It seems like you’re encountering a path issue where the torizoncore-builder command isn’t recognized in your environment. This typically happens when the executable isn’t in your system’s PATH or if there’s an issue with how the environment was set up. Here are a few steps to troubleshoot and potentially resolve the issue:

  1. Verify Installation: Ensure that the torizoncore-builder tool is correctly installed and accessible. Since you’re running it within a Docker container, make sure that the container is properly set up with all necessary dependencies.

  2. Check PATH Environment Variable: Inside your WSL2 environment, check if the PATH variable includes the directory where torizoncore-builder is installed. You can view your PATH variable by running echo $PATH in the terminal. If the path to torizoncore-builder is missing, you’ll need to add it.

  3. Source the Environment Script: Since you mentioned sourcing tcb-setup-env.sh, ensure that this script is correctly setting up the environment. It’s possible that the script didn’t execute as expected or didn’t modify the PATH variable correctly. Try running source tcb-setup-env.sh again and check if the PATH variable is updated accordingly.

  4. Directly Invoke the Tool: If the tool is installed in a known location, you can try invoking it directly using its full path. For example, if torizoncore-builder is located in /usr/local/bin/, you can run it by typing /usr/local/bin/torizoncore-builder -h in the terminal.

  5. Permissions: Ensure that the torizoncore-builder executable has the correct permissions set. You can set the executable permission using the chmod +x /path/to/torizoncore-builder command.

  6. Docker Container Execution: If you’re running commands inside a Docker container, ensure that the container’s environment is correctly set up to access or include torizoncore-builder. It might be necessary to adjust the Docker run command to mount the appropriate volumes or set the correct environment variables.

To answer your question, yes, it is indeed possible to customize the Torizon OS image through a pipeline. The steps you’ve outlined are generally correct, but the issue seems to be with the environment setup or the way torizoncore-builder is being accessed. Following the troubleshooting steps above should help in resolving the “command not found” error.

Best regards,
Toradex AI Assistant

Please, also check if these links can help you solve your problem:

TorizonCore Builder Tool - Customizing Torizon OS Images | Toradex Developer Center.

Hello @Ahmed49,

Thanks for reaching out!
You need to source the environment script every time you want to work in a new shell. I think this could be the issue.
Otherwise, could you please check if the docker image for torizoncore-builder is pulled into your WSL? You can check it with the command docker images.