I'm writing a Dockerfile. I want to have a variable that I can pass around to different PowerShell scripts.
FROM mcr.microsoft.com/windows/servercore/iis
ENV CONT_IMG_VER test
RUN echo $CONT_IMG_VER
Outputs
Step 4/4 : RUN echo $CONT_IMG_VER
---> Running in 70c2085d9735
$CONT_IMG_VER
Instead of
Step 4/4 : RUN echo $CONT_IMG_VER
---> Running in 70c2085d9735
test
UPDATE: Per Dockerfile reference looks like RUN does not supports ENV.
How can I declare a variable in a Dockerfile that I can use in multiple RUN instructions?