title: How to set SSH_AUTH_SOCK env variable in docker container windows
body: <p>I copying over my ssh key in a dockerfile for dev purposes on a windows machine, but I cannot get the SSH_AUTH_SOCK variable set,</p>
  
  <p>here is my Dockerfile</p>
  
  <pre><code>FROM node:alpine
  
  
  WORKDIR /usr/src/app
  COPY package.json .
  
  ADD id_rsa /root/.ssh/id_rsa
  RUN chmod 700 /root/.ssh/id_rsa \
    &amp;&amp; touch /root/.ssh/known_hosts \
    &amp;&amp; ssh-keyscan -H github.com &gt;&gt; /root/.ssh/known_hosts \
    &amp;&amp; eval `ssh-agent -s` &amp;&amp; ssh-add /root/.ssh/id_rsa
  
  RUN yarn
  CMD [ "npm", "start" ]
  </code></pre>
  
  <p>I tried to eval the result of ssh-agent as well in my compose file</p>
  
  <pre><code>command: &gt;
    sh -c 'eval `ssh-agent -s`
    &amp;&amp; ssh-add /root/.ssh/id_rsa
    &amp;&amp; echo $SSH_AUTH_SOCK'
  </code></pre>
  
  <p>And when I executed my simple nodejs file, the <code>SSH_AUTH_SOCK</code> is not set.</p>
  
  <p><code>printenv</code> doesn't show it as well, is there a way to do this.</p>
  
  <p>I can see there are lots of ssh-agent forwarder solution for linux and osx, but it does not work on windows.</p>