Balena CLI deploy buildArg not passed through

Hey everyone,

I have secrets that are used during build-time to libraries, where I need to be authenticated. I wanted to use the CLI v9.6.0 where the help seems to make this possible via balena deploy -B 'ACCESS_KEY=secret' ....

But I only receive an error that it is not possible because the build is unauthenticated. So it seems to me that the buildArg does not get forwarded. Verbose logging doesn’t give a hint since it does not show any output from stdout.

Am I missing something or does anyone know a workaround? Every hint is appreciated.

Thanks in advance


Concerning the workflow/steps-to-reproduce:

$ balena deploy --nocache -B 'ACCESS_KEY=secret' <appName>

docker-compose Snippet:

      context: module1/
        - ACCESS_KEY

Dockerfile Snippet:


hi @Wachiwi, I had a little play around with this and it seems its currently only working with single container applications (i.e. where there is no docker-compose.yml and just a Dockerfile at the root of the directory). Somehow the -B flag is not working with compose file projects. I have raised an issue for this here: and hopefully @pdcastro our CLI maintainer will have some time in the coming days to issue a fix.

Thanks for the report!

Ah ok, thank you very much.