Docker Community Forums

Share and learn in the Docker community.

ENV to support build-time values in Dockerfile

(Mvallee) #1

Maybe it`s there already, and I’ve missed it…

But, I think it would be great if ENV can be a little more dynamic in Dockerfile. For instance…

ENV VERSION=`cat version`

Like we do in bash, to execute a command, and pass it into a variable…


(Sven Dowideit) #2

@erikh? I don’t think I’ve seen a proposal for it yet - and I’m not sure if there are any side-effect issues to worry about.

(Sven Dowideit) #3

I did just come across

but that’s not really about this either.

(Larry Cai) #4

see as well, it is very useful for proxy issues during build as well.

So we can keep the Dockerfile consistency even in firewall when they need access external repo.