I am using the image microsoft/windowsservercore to create a windows container running on Docker for windows on Windows 10 Desktop. I have installed git in this container using chocolatey like this:
FROM microsoft/windowsservercore
# some other steps go here
RUN @powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
RUN choco install git -params '"/GitAndUnixToolsOnPath"' -y
EXPOSE 8080  
# some other steps go here
Git is installed fine in the container and if I open the CMD prompt of the container like this:
docker exec -it mycontainer cmd
I can access the git command. However, I need to run git clone and for that I either need to place my SSH keys in some directory to be picked by git or I will have to use https. When I use https, it gets stuck at cloning repository step forever. Not sure why that happens. I can ping bitbucket.org from the container and git clone works fine on the host machine using https. Other thing I need to understand is where does git look for SSH key so that I can create one and copy to that directory ?
 
     
    