Docker build arguments not expanded


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
          build: ./docker-source
            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!


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.