In order to read private repositories at build time i need to provide a private key to the docker build command.
The docker build works on its own with the following command, to add a secret SSH_PRV_KEY which is an ed25519 private key file
DOCKER_BUILDKIT=1 docker build --secret id=SSH_PRV_KEY,src=id_ed25519
Following Build Secrets · Fly Docs I simply try to provide the secret
flyctl deploy --build-secret SSH_PRV_KEY=$(cat id_ed25519)
But this doesn’t work, the secret in the docker build ends up being only the first line of the private key file. As far as i know, i cannot alter the format of the private key to make it work.
Why is the --build-secret argument having such behaviour and should this be considered a bug?