I want to pass my file content as build argument in docker build command using --build-arg. I am using following command in terminal and it is working fine
docker build -t example --build-arg PRIVATE_KEY="$(cat /home/key)" .
but when I am trying same thing in azure devops pipeline docker build task and passing --build-arg PRIVATE_KEY="$(cat /home/key)"
in arguments box its taking the value as it is i.e, $(cat /home/key)
and not executing the cat command.