About TorizonCore Builder

Hi team,

We have a customer struggling with the final steps of a Torizon OS development, getting closer to mass production.

Environment:
Development OS: WSL (WSL generated from VSCode’s Torizon IDE Extension)
Development environment: VSCode (1.96.0)
Torizon IDE Extension (2.7.0)
TorizonCore Builder (3.12.0)
Host OS: Windows 11 Pro

Q1. We run the “create-production-image” task to build a release container image, but we want to use a local registry without pushing it to DockerHub.

If possible, I would like to know how to do this, ideally with TorizonCore Builder. Is there any documentation?

Q2. When I run “create-production-image”, docker-compose.prod.yml is created, but the contents from docker-compose.yml do not change.

When I changed “$composeServices = $composeLoad.Services” in L191 of createDockerComposeProduction.ps1 to “$composeServices = $composeLoad.services”, the intended yml was generated. This fixed the issue, but kindly confirm.

Q3. To what extent does the VSCode Extension “TorizonCore Builder” support TorizonCore Builder functions? Is there any documentation with more details?

Thank you in advance!

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello,

Thank you for reaching out with your questions about TorizonCore Builder. Let’s address each of your queries:

Q1: Using a Local Registry with TorizonCore Builder

To use a local registry instead of DockerHub for your production image, you need to configure Docker to push images to your local registry. Ensure your local registry is running and accessible. Then, tag your image with your local registry’s address before pushing. For example, if your local registry is at localhost:5000, tag your image as localhost:5000/your-image-name and push it using Docker commands. Note that TorizonCore Builder itself does not manage image registries, so this step is handled outside of the tool.

Q2: Modifying docker-compose Files

The issue you encountered with the createDockerComposeProduction.ps1 script appears to be related to case sensitivity. In YAML, keys are case-sensitive, so changing $composeLoad.Services to $composeLoad.services aligns with the correct case used in your docker-compose.yml. This modification is valid if it resolves the issue and generates the intended docker-compose.prod.yml. Ensure that your script modifications are consistent with the YAML file’s structure.

Q3: VSCode Extension Support for TorizonCore Builder

The VSCode extension for TorizonCore Builder offers several features to aid development:

  • Project Creation and Management: You can create and manage TorizonCore Builder projects directly within VSCode.
  • IntelliSense and Validation: The extension provides IntelliSense and validation for the tcbuild.yaml configuration file.
  • Command Execution: Execute TorizonCore Builder commands such as Build, Unpack, and Deploy directly from VSCode.
  • Integration: Seamless integration with TorizonCore Builder for efficient image customization and deployment.

I hope this helps clarify your questions. If you have further inquiries, feel free to ask.

Best regards,
Toradex AI Assistant

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

Torizoncore-builder bundle with private docker registry.

Hi @alvaro.tx,

We run the “create-production-image” task to build a release container image, but we want to use a local registry without pushing it to DockerHub.
If possible, I would like to know how to do this, ideally with TorizonCore Builder. Is there any documentation?

I’m a little confused here you say “create-production-image” which is a task from our VSCode extension. But then you say “with TorizonCore Builder”. Could you be more specific on what it is you want to do exactly?

When you run create-production-image there is a prompt to input your desired docker image registry to store the production container image. Have you tried just specifying your desired local registry in this prompt?

For TorizonCore Builder, again what do you mean? What action do you want to do with a local registry? The bundle command? If yes then again it’s just a matter of specifying the local registry explicitly. There are multiple threads about using TorizonCore Builder bundle command with local registries:

When I run “create-production-image”, docker-compose.prod.yml is created, but the contents from docker-compose.yml do not change.
When I changed “$composeServices = $composeLoad.Services” in L191 of createDockerComposeProduction.ps1 to “$composeServices = $composeLoad.services”, the intended yml was generated. This fixed the issue, but kindly confirm.

I’m confused isn’t this what is expected? You’re running the task to create-production-image therefore a docker-compose.prod.yml file is generated. Why would you expect the non-production docker-compose.yml file to be affected by this?

The expected behavior of the create-production-image task is detailed in our documentation here: Build, Test and Push Applications for Production | Toradex Developer Center

To what extent does the VSCode Extension “TorizonCore Builder” support TorizonCore Builder functions? Is there any documentation with more details?

The primary functionality of TorizonCore Builder support is whatever is supported by the build command yaml specification: TorizonCore Builder Tool “build” command | Toradex Developer Center

Anything else it would be better to just use TorizonCore Builder on the command-line instead of through the extension.

Best Regards,
Jeremias

1 Like