title: Setup git via windows docker file
body: <p>I write <code>Dockerfile</code> which is based on <a href="https://hub.docker.com/r/microsoft/nanoserver/" rel="noreferrer">windowsnanoserver</a>. I need to add to this image git. In order to achieve it I did the following:</p>
  
  <pre><code>RUN Invoke-WebRequest 'https://github.com/git-for-windows/git/releases/download/v2.12.2.windows.2/Git-2.12.2.2-64-bit.exe'
  RUN Invoke-Expression "c:\Git-2.12.2.2-64-bit.exe"
  </code></pre>
  
  <p>But when I execute this lines via docker build, I receive following error message:</p>
  
  <blockquote>
    <p>Invoke-Expression : The term 'c:\Git-2.12.2.2-64-bit.exe' is not
    recognized as the name of a cmdlet, function, script file, or operable
    program. Check the spelling of the name, or if a path was included,
    verify that the path is correct and try again.</p>
  </blockquote>
  
  <p>I realize that this error message indicates that due to console nature of windows docker images I'll not be able to execute GUI installers. Unfortunately git doesn't have console installer. <a href="https://chocolatey.org/" rel="noreferrer">Chocolatey</a> works fine under <a href="https://hub.docker.com/r/microsoft/windowsservercore/" rel="noreferrer">windowsservercore</a> image but doesn't work at <a href="https://hub.docker.com/r/microsoft/nanoserver/" rel="noreferrer">windowsnanoserver</a>. In order to install git for <a href="https://hub.docker.com/r/microsoft/nanoserver/" rel="noreferrer">windowsnanoserver</a> I have idea to repeat in <code>Dockerfile</code> commands from <a href="https://chocolatey.org/packages/git.install" rel="noreferrer">chocolatey git installer</a> which is fine for me, but still I'd like to know is there any simpler way to install git on <a href="https://hub.docker.com/r/microsoft/nanoserver/" rel="noreferrer">windowsnanoserver</a>? </p>