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?
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: