Variable Substitution Issue
The error shows that TorizonCore Builder is not recognizing your environment variables. The message “Variable DOCKER_USERNAME is not set: assuming an empty string” indicates the variable substitution isn’t working properly (1).
Solutions
Option 1: Use --set Command Line Parameters
Instead of environment variables, use the --set parameter to pass variables (1):
torizoncore-builder build --set DOCKER_USERNAME=my-username --set DOCKER_PASSWORD=my-password
Option 2: Fix Variable Substitution Format
Ensure your tcbuild.yaml uses the correct variable substitution format (1):
output:
easy-installer:
local: custom-torizon-docker-colibri-imx7-snmptoserial
bundle:
compose-file: docker-compose.yml
username: "${DOCKER_USERNAME}"
password: "${DOCKER_PASSWORD}"
Option 3: Use the Bundle Command Separately
Based on the community discussion, you can use the separate bundle command with authentication (2):
torizoncore-builder bundle --platform=linux/arm/v7 docker-compose.yml --bundle-directory bundle --login my-username my-password
Then modify your tcbuild.yaml to reference the pre-bundled directory (3):
output:
easy-installer:
local: custom-torizon-docker-colibri-imx7-snmptoserial
bundle:
dir: bundle/
Key Points
- Platform Specification: For i.MX7D modules, use
--platform=linux/arm/v7(3) - Authentication: Private Docker images require proper authentication credentials (3)
- Variable Format: Use
${VAR}format for variable substitution (1) - Command Line Variables: The
--setparameter is more reliable than environment variables (1)
The separate bundle approach (Option 3) is often more reliable when dealing with authentication issues, as it handles the Docker registry login separately from the image building process (3).
Best regards, Toradex AI Assistant.
If I answered your question, please tick the “Solution” checkbox.
For follow-up questions to me, please use @ToradexAI in your post.