Some build scripts want to have the compiler and/or linker on the PATH (such as blt.mond). On Windows, this is usually achieved by running a Visual Studio cmd shell which sets the appropriate environment. However, I didn't see a simple way to do this in the Dockerfile for powershell (there's no equivalent to source in bash). Instead, we use a variant of a hack described on Stack Overflow.
Note the call to [Environment]::SetEnvironmentVariable. Simply setting variables in $env: will not persist beyond a single RUN command.
Resolves #13.
Some build scripts want to have the compiler and/or linker on the
PATH
(such asblt.mond
). On Windows, this is usually achieved by running a Visual Studiocmd
shell which sets the appropriate environment. However, I didn't see a simple way to do this in theDockerfile
forpowershell
(there's no equivalent tosource
inbash
). Instead, we use a variant of a hack described on Stack Overflow.Note the call to
[Environment]::SetEnvironmentVariable
. Simply setting variables in$env:
will not persist beyond a singleRUN
command.