How to install and use the Torizoncore- builder extension in VSC

I am trying to setup the torizoncore-builder in a Ubuntu-24.04 WSL environment. I am trying to use the VSC extension and it IS installed, but I can’t seem to find anything on the website anymore about how to setup a project.
In the past, I just ran all the commands that I needed manually, but the one I can’t run is bundle. The problem is that my docker registry is on the same computer I am running on and for some reason, it WILL NOT connect to it to pull off the image it needs. Is there another way to bundle the image? I have an exported tar file that I can load into docker, is there a way to use that? the bundle command either can’t find the registry or if it does, it can’t find the image name. Yet I can launch it just fine on the device. Do I need to put the image in a Kubernetes repository to get this to work?
I just need to create a easy loader build that has the changes to the Torizon OS and contains my image in the docker images and the compose file in the right location so after production installs it using the autoload from a thumbdrive, that the program will just come up and run. The “bundle” command is not working for me so I can’t build the final image.

Thanks,
Steve

Hi, I’m the Toradex AI Assistant.

I might make mistakes or occasionally get you wrong. Our support team will step in if needed.


Alternative Approaches to Bundle Docker Images

I understand your frustration with the bundle command and local registry connectivity issues. There are several alternative approaches you can use to achieve your goal.

Option 1: Use the Build Command with Docker Compose File

Instead of using the bundle command separately, you can use the build command directly with your Docker Compose file(1). This approach bypasses the need for a separate bundling step:

output:
  easy-installer:
    local: torizon-core-docker-colibri-imx6-with-containers
    bundle:
      compose-file: custom/docker-compose.yml

(1)

This method downloads the container images from Docker registries every time the build command is executed, but it eliminates the separate bundle step that’s causing you issues(2).

Option 2: Load Your TAR File into Docker and Use Local Registry

Since you have an exported TAR file, you can:

  1. Load it into your local Docker environment
  2. Tag it appropriately for your local registry
  3. Ensure your Docker Compose file references the correct local registry path

For local registry connectivity issues, the bundle command supports parameters for insecure registries(3):

$ torizoncore-builder bundle docker-compose.yml --platform linux/arm/v7 --dind-param="--insecure-registry=192.168.0.30:5001"

(3)

Option 3: Pre-bundled Directory Approach

If you can get the bundle command working once, you can reuse the bundle directory(1):

  1. First, run the bundle command when it works:
$ torizoncore-builder bundle docker-compose.yml --bundle-directory bundle --platform linux/arm64

(1)

  1. Then use the pre-bundled directory in your configuration:
output:
  easy-installer:
    local: path/to/your/custom-image-folder
    bundle:
      dir: bundle/

(1)

Registry Configuration Tips

The bundle command also supports environment variables and additional Docker-in-Docker parameters(3):

$ torizoncore-builder bundle docker-compose.yml --platform linux/arm/v7 --dind-env VAR1='value 1' --dind-env VAR2='value 2'

(3)

Platform Specification

Make sure you’re specifying the correct platform for your target device(2):

  • For i.MX6/i.MX7 based SoMs: --platform=linux/arm/v7
  • For i.MX8 based SoMs: --platform=linux/arm64

I’d recommend trying Option 1 first (using the build command directly with your Docker Compose file) as it’s the simplest approach and avoids the registry connectivity issues you’re experiencing with the bundle command.

Best regards, Toradex AI Assistant.


Did you like my answer? :+1: :-1:

If I answered your question, please tick the “Solution” checkbox.

For follow-up questions to me, please use @ToradexAI in your post.

@ToradexAI
I have tried the full build method, but I get the same issue(s) I explained in my post. It appears to go through exactly the same steps so I see no reason to do that.

In option 2, you write:
“2. Tag it appropriately for your local registry”
What would you suggest here? I have tried different IP addresses, different names, etc. and nothing works that I can find. Please be specific. Just use: myname.tagname and show me what you would suggest. In the actual registry on the device, it is just myname.tagname. I will tell you though that if you put the --platform=arm64, it overwrites the tagname that it looks for.
Steve

Specific Registry Configuration for Local Docker Registry

Based on the TorizonCore Builder documentation, here’s the specific approach for your local registry issue:

Step 1: Load and Tag Your TAR File

Load your TAR file and tag it for your local registry:

docker load -i your-image.tar
docker tag myname.tagname localhost:5000/myname.tagname

Step 2: Configure Docker Compose File

Your docker-compose.yml should reference the local registry explicitly:

version: '2.4'
services:
  your-service:
    image: localhost:5000/myname.tagname
    # other service configuration

Step 3: Use Bundle Command with Registry Parameters

The bundle command supports specific parameters for local registries(1):

torizoncore-builder bundle docker-compose.yml --platform=linux/arm64 --bundle-directory bundle --dind-param="--insecure-registry=localhost:5000"

Alternative Registry Configurations

If localhost:5000 doesn’t work, try these alternatives:

  1. Using host IP address:
docker tag myname.tagname 192.168.1.100:5000/myname.tagname
  1. Using Docker Desktop internal networking:
docker tag myname.tagname host.docker.internal:5000/myname.tagname

Platform Override Issue

You mentioned the --platform=arm64 overwrites the tag name. The bundle command uses the --platform parameter to select the appropriate architecture when multi-platform images are specified(1). To avoid conflicts:

  1. Ensure your Docker Compose file specifies the exact image name you want
  2. The platform parameter should match your target device architecture

Registry Connection Parameters

The bundle command also supports additional Docker-in-Docker parameters for registry connectivity(1):

torizoncore-builder bundle docker-compose.yml --platform=linux/arm64 --bundle-directory bundle --dind-param="--insecure-registry=localhost:5000" --dind-param="--registry-mirror=http://localhost:5000"

Try the localhost:5000 approach first with the --insecure-registry parameter, as this is the most common configuration for local Docker registries in development environments.

Best regards, Toradex AI Assistant.


Did you like my answer? :+1: :-1:

If I answered your question, please tick the “Solution” checkbox.

For follow-up questions to me, please use @ToradexAI in your post.