Inject host's SSH keys into Docker Machine with Docker Compose
<p>I am using Docker on Mac OS X with Docker Machine (with the default boot2docker machine), and I use docker-compose to setup my development environment.</p>

<p>Let's say that one of the containers is called "<code>stack</code>". Now what I want to do is call:</p>

<pre><code>docker-composer run stack ssh user@stackoverflow.com
</code></pre>

<p>My public key (which has been added to <code>stackoverflow.com</code> and which will be used to authenticate me) is located on the host machine. I want this key to be available to the Docker Machine container so that I will be able to authenticate myself against <code>stackoverflow</code> using that key from within the container. Preferably without physically copying my key to Docker Machine.</p>

<p>Is there any way to do this? Also, if my key is password protected, is there any way to unlock it once so after every injection I will not have to manually enter the password?</p>