Docker build arguments not expanded

#1

Hello everyone! I have a dockerfile which exposes some environment variables. I’d like to see those parameters in my build as well, but it looks like they are not expanded. Here what I use in the pipeline.yaml file:

      - put: feature-container
        params:
          build: ./docker-source
          build_args:
            authors: ${authors}
            dev: ${isdev}
            version: ${VERSION}
            revision: ${REVISION}

What I see in the output is something like authors: ${authors} and this makes me think the environment variables are not expanded during the build.
I think the Dockerfile is correct, because if I build and run the image manually, the envs are properly substituted.
Could you please help me with that?
Thanks a lot!
Simone

#2

From Concourse’s perspective ${stuff} is just a standard string in the pipeline yaml. The correct way to pass vars in a pipeline is with ((stuff)).

So you can use that format for the variables in the pipeline then provide those values either through a credential store (i.e. credhub/vault) or via --var or --load-vars-from when setting the pipeline.