Q:

Dockerfile string interpolation behaviour

I am currently using docker for windows and am trying to work out how to do string interpolation within parts of my dockerfile. 
So for example, here is a pretty complex dockerfile which seems to embed ARG and ENV variables all over the shop:
https://github.com/Microsoft/docker/blob/master/Dockerfile
So if you look at line 40
# allow replacing httpredir mirror
ARG APT_MIRROR=httpredir.debian.org
RUN sed -i s/httpredir.debian.org/$APT_MIRROR/g /etc/apt/sources.list

or even line 106
# Configure the container for OSX cross compilation
ENV OSX_SDK MacOSX10.11.sdk
ENV OSX_CROSS_COMMIT 8aa9b71a394905e6c5f4b59e2b97b87a004658a4
RUN set -x \
    && export OSXCROSS_PATH="/osxcross" \
    && git clone https://github.com/tpoechtrager/osxcross.git $OSXCROSS_PATH \
    && ( cd $OSXCROSS_PATH && git checkout -q $OSX_CROSS_COMMIT) \
    && curl -sSL https://s3.dockerproject.org/darwin/v2/${OSX_SDK}.tar.xz -o "${OSXCROSS_PATH}/tarballs/${OSX_SDK}.tar.xz" \
    && UNATTENDED=yes OSX_VERSION_MIN=10.6 ${OSXCROSS_PATH}/build.sh
ENV PATH /osxcross/target/bin:$PATH

You will see that they are putting those env/arg variables into various RUN commands by $MyVarName or ${MyVarName}, which I assume must work for them.  However if I try to do anything like this, it blows up on me and I am struggling to find much information on how this all should work, and also if this is possibly a problem with me running docker in windows (actually using windows based containers too) vs using docker in linux. 
So here is an example I have:
FROM some/image

ENV Version 0.1.0

RUN curl -L -o c:/some-output-dir http://some-url/downloads/file-$Version.zip

I have also tried using ${Version} that doesnt seem to work well either, so can anyone either point me to a succinct "here is how you do string interpolation in dockerfiles" or quickly school me on what is going wrong here and why it seems to not be resolving the variable properly, as I know that there is a file at http://some-url/downloads/file-0.1.0.zip. 
I have also tried using array notation style running i.e RUN ["curl", "-L", ...] but that didnt seem to change anything, but my example seems to be pretty much in line with how other docker files are, and they work... I have even tried using $(Version) but that doesnt seem to work either. 

A:

Incase anyone else has this issue and is a bit confused, as it turns out there is a distinction to what is run within the Docker world and in the Container world, which is where I was getting confused. 
So when you see the ${someVar} and $someVar that is basically a unix thing so this is correct and works fine in the Unix world, but in the windows world it seems cmd/powershell doesnt understand this and just treats it as literal. 
So in the windows world when you are wanting to embed environment vars within your cmd/powershell stuff you need to use %someVar% and it will work.