How to mount private SSH key to Docker for Windows container?
Good day everyone.
I have following dev environment:
- Win 10 host
- Docker for Windows latest
- php5.6 image running in container via docker-compose
How can i mount my private SSH key to this container? Or is there any possibility to tunnel Pageant from host machine to container?
All i want is to run Capifony deploy procedures in my container.
One Solution collect form web for “How to mount private SSH key to Docker for Windows container?”
You could use a volume with
-v /c/Users/<user>/.ssh/id_rsa:/<home dir>/.ssh/id_rsa:ro.
~ of the user e.g.
:ro will make it readonly, so your key will not be overwritten by accident.
But i think you should create a new key and copy it inside the container while building the image.