TorizonCore Builder docker-compose.yml with single "$" dollar symbol doesn't work


We are using torizoncore-builder to build images for colibri-imx7-emmc. Command “torizoncore-builder build” failes when we use docker-compose.yml with single “$” dollar symbol. Changing “$” to double dollar symbol “$$” in docker-compose.yml solves the issue.

Our goal is to use original docker-compose.yml with single “$” symbol. Can you make torizoncore-builder to accept docker-compose.yml with single “$” dollar sign?

Our docker-compose.yml file content:

version: '2'

        image: portainer/portainer:1.24.2
        container_name: portainer
        command: --admin-password '$2y05'

Our tcbuild.yaml file content:

      version: "5.7.0"
      release: quarterly
      machine: colibri-imx7-emmc
      distro: torizon-upstream
      variant: torizon-core-docker
      build-number: "17"
      build-date: "20220728"
    local: output_directory
    name: "custom image name"
    description: "custom image description"
      compose-file: docker-compose.yml

Also adding “torizoncore-builder --verbose build” command output as an attachement.
build otput.txt (12.7 KB)

We use latest stable torizoncore-builder: torizon/torizoncore-builder:3.6.0-20220912.

Hello @mseskas ,
This is a docker-compose related topic, not related to torizoncore-builder. There is not much that can be done about it.

Why do you need this special docker-compose behavior?

Best regards,

Only TorizonCore builder failes to accept docker-compose.yml with single “$” dollar symbol. Docker itself works fine. Also any other tool that parse yml files accept single “$” dollar symbol in compose file.
What whould you suggest to do to make TorizonCore builder accept this compose file?

version: '2'

        image: portainer/portainer:1.24.2
        container_name: portainer
        command: --admin-password '$2y05'

Hi @mseskas!

I just tried to run the docker-compose.yml you shared, and I get the following error:

[  3:58 ]  [ ~/apagar ]
 $ cat docker-compose.yml
       │ File: docker-compose.yml
   1   │ version: '2'
   2   │
   3   │ services:
   4   │     portainer:
   5   │         image: portainer/portainer:1.24.2
   6   │         container_name: portainer
   7   │         command: --admin-password '$2y05'
[  3:58 ]  [ ~/apagar ]
 $ docker-compose up
ERROR: Invalid interpolation format for "command" option in service "portainer": "--admin-password '$2y05'"
[  3:59 ]  [ ~/apagar ]  [ 1 ]
 $ docker --version
Docker version 20.10.12, build e91ed57
[  3:59 ]  [ ~/apagar ]
 $ docker-compose --version
docker-compose version 1.26.2, build eefe0d31

Are you sure that docker compose doesn’t fail on your side?

Best regards,

You are right, it does fail on our side. Docker-compose doesn’t accept compose file with single $ symbol. We are sorry for misinformation.
Thank you.

Hi @mseskas !

No problem :slight_smile:

Here is a related Docker Compose documentation about environment variables: Environment variables in Compose | Docker Documentation

Best regards,