Torizoncore-builder bundle modifies used docker-compose.yml

I executed torizoncore-builder bundle with doccker-compose.yml.

Docker images was added to image correctly.
I also learned that the docker-compose.yml file was copied into /var/sota/storage/docker-compose/ directory.

BUT the docker-compose.yml was also edited so that all environment variable definitions were replaced by “”.
E.g.,
WM_SERVICES_MQTT_PORT: ${WM_SERVICES_WNT_MQTT_PORT}
was changed to
WM_SERVICES_MQTT_PORT: ‘’

Just wondering,

  • why the docker-compose.yml was copied to /var/sota/storage/docker-compose directory?
  • why docker-compose.yml was modified when executing bundle command?

Best regards,
Timo Välimäki

Hi @timov ,

Welcome to our community!

To answer your questions:

The docker-compose.yml file was copied to /var/sota/storage/docker-compose because Torizon OS has a custom systemd service called docker-compose.service that checks the existence of a compose YAML in this path. If it exists then the service runs docker-compose up to bring up the containers. Otherwise, it does nothing.

This allows one or more containers to automatically start as soon as the OS is initialized, and of course they are initialized according to the configurations set in the docker-compose.yml file.


I think the environment variables are being expanded in the bundle command. Given that those are not defined on your host system it expands them to the empty string "". If you want the compose file to have the literal string ${VAR} in it you can do a workaround using a .env text file, as I previously did for another customer:

Let me know if this helps.

Best regards,
Lucas Akira

This solves the problem.
It would not harm to add this trick to torizoncode-builder documentation.
BR
-timo-

Hi @timov ,

Glad this solved the problem!

It is a valid request. I’ll contact the team to discuss a possible update to the article with this information. Thank you for your feedback.

Best regards,
Lucas Akira