Docker - environment variable during build
Yes it is quite possible to set environment variable during build ,
Example snippet from Dockerfile,
RUN cd c:\app; .\some.install --version $($env:CLIVERSION)
If you notice code above, you can immediately tell that , $($env:VERSION) is the variable.
So when we run it we do something like :-
docker build -t netcorebuilder --build-arg VERSION=1.0.19
Comments