Production image and debug

Hi,

I succeded to produce a production image with my application in container.

I used torizon-docker-colibri-imx6ull-emmc-Tezi_7.4.0+build.28.tar image

I can access the target with SSH but I cannot see it in Visual Code Torizon extension installed ( I can see another target on the same network).

Is this behaviour normal ?

Is there an image ( that can embedd my application container) that can be used to debug too ?

best regards.

Hi, I’m the Toradex AI Assistant.

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


Understanding Production Images and VS Code Extension Compatibility

The behavior you’re experiencing is expected when using production images with your application containers(1). When you build a production image using the create-production-image task, the container is optimized for production deployment and removes debug configurations that are necessary for VS Code Torizon Extension integration(1).

Debug vs Production Container Differences

The Torizon IDE Extension offers different tasks for different purposes(1):

  • Debug containers: Built using Dockerfile.debug with additional dependencies and settings to enable remote debugging on VS Code(1)
  • Production containers: Built using the standard Dockerfile with only essential configuration, removing debug capabilities(1)

Recommended Approach

For development and debugging, you should use the run-container-torizon-release-<arch> task instead of production images(1). This task:

  1. Builds a container image based on Dockerfile(1)
  2. Pushes the container image to the local container registry (localhost:5002)(1)
  3. Pulls the container image to your SoM set as the default target(1)
  4. Runs the container on your SoM using the docker-compose.yml configuration(1)

This allows you to test your application with only essential configurations while maintaining compatibility with the VS Code extension for debugging purposes(1).

Alternative Development Workflow

You can also use the TorizonCore Builder VS Code Integration for OS customization while maintaining debugging capabilities(2). This approach allows you to create custom images that include your application while preserving the development environment features(2).

**


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

My problem is not the build process, it’s that Torizon extension cannot see the production target as a “CONNECTED DEVICES”.

I suspect my base image torizon-docker-colibri-imx6ull-emmc-Tezi_7.4.0+build.28.tar don’t embed necessary files to make debug.

If I’m right is there a torizon base image I can use in production and in debug mode ?

Understanding Production vs Development Images

You’re correct in your observation. The production image you’re using (torizon-docker-colibri-imx6ull-emmc-Tezi_7.4.0+build.28.tar) is specifically designed for production deployment and lacks the debugging infrastructure required by the VS Code Torizon Extension (1).

Base Image Recommendation for Development

For development and debugging purposes, you should use a Torizon OS image without evaluation containers as your base (2). The documentation specifically warns that “the input image to be customized MUST NOT contain bundled container images” (2).

When selecting your base image, ensure you download an image without evaluation containers from the Toradex download links (2). This type of base image contains the necessary debugging infrastructure while still allowing you to bundle your application containers for production.

Development Workflow Approaches

The documentation outlines different approaches for different stages of your development cycle (1):

For Development and Debugging

  • Use the Torizon IDE Extension: This is recommended when you are “developing and evaluating application containers” (1)
  • The IDE Extension allows you to “quickly generate, develop, deploy and debug Docker application containers” (1)

For Production Programming

  • Pre-provision container images onto Torizon OS: This is used when “preparing your own custom Torizon OS image for production programming” (1)
  • This allows the device to “boot with your containers from the first time, without the need to pull those from the internet” (1)

Solution for Your Use Case

To maintain both debugging capabilities and production readiness:

  1. Start with a base Torizon OS image without containers for your TorizonCore Builder workflow (2)
  2. Use this base image to create your custom production image with bundled containers (1)
  3. For debugging, deploy your containers using the IDE Extension’s development tasks rather than the production image (3)

This approach allows you to have both a production-ready image and maintain debugging capabilities during development.

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.