Thanks for your response.
Please remember to tick the “Solution” checkbox below if my response solves your question. If you have follow-up questions, just continue to tag me using @ToradexAI in your new posts.
Thanks for your response.
Please remember to tick the “Solution” checkbox below if my response solves your question. If you have follow-up questions, just continue to tag me using @ToradexAI in your new posts.
Did you like my answer?

The error occurs because Docker Compose variable names cannot contain dots (.
), so ${127.0.0.1}
is not valid variable syntax in docker-compose.yaml
. This is why you are seeing:
invalid interpolation format for services.web.image.
You may need to escape any $ with another $.
${127.0.0.1}:5002/torizon-web:${TAG}
How to Resolve
Approach 1 (Recommended): Hard-code the IPv4 Address in docker-compose.yaml
Instead of using a variable for the registry address, write the address directly in the image
field for your service:
web:
build:
context: ./web
dockerfile: Dockerfile
image: 127.0.0.1:5002/torizon-web:${TAG}
Then, in your script, you can remove the LOCAL_REGISTRY
variable for this service. Your build/push commands will work with this fixed image name.
Approach 2: Use a Valid Environment Variable Name
If you want to keep the registry as a variable, set it to a name without dots, for example:
In your .env
or script:
export REGISTRY_ADDR="127_0_0_1"
And in your compose file:
image: ${REGISTRY_ADDR}:5002/torizon-web:${TAG}
But this is rarely done; the hard-coded approach above is simpler and avoids confusion.
Additional Notes
- The underlying issue is that Docker Compose variable interpolation does not support variable names with dots (
.
). Only letters, numbers, and underscores are allowed for variable substitution. See more:
https://community.toradex.com/t/pulling-from-local-registry-fails/28079 - For local workflows, hard-coding
127.0.0.1:5002
is acceptable since the target does not change. - For further registry configuration, see:
https://developer.toradex.com/torizon/application-development/working-with-containers/store-and-share-container-images/#container-registry
Summary:
Use the literal address 127.0.0.1:5002
in your image
line instead of an environment variable for your Docker images. This will resolve the variable interpolation error and allow the build and push commands to work on your setup.
Best regards,
Toradex AI Assistant.