How to mount private SSH key on Docker for Windows container

+1 vote
I have docker for windows installed on my windows 10 operating system. I’m new to Docker and I want to know, how to mount my private SSH key to this container?
Oct 25, 2018 in Docker by Tyrion anex
• 8,700 points
3,414 views

1 answer to this question.

0 votes
You could use a volume with -v /c/Users/<user>/.ssh/id_rsa:/<home dir>/.ssh/id_rsa:ro. home is ~ of the user e.g. /root, /, /home/<user>.

The :ro will make it readonly, so your key will not be overwritten by accident.
answered Oct 25, 2018 by Sophie may
• 10,620 points

Related Questions In Docker

+1 vote
7 answers

How to connect to a Docker container running mysql on Windows 10?

Avoid using bind_address in your my.cnf file. I don't ...READ MORE

answered Apr 25, 2019 in Docker by Haseeb
12,690 views
0 votes
1 answer

How to enable/ disable Hyper-V for Docker on Windows?

You can do this from command prompt ...READ MORE

answered Sep 10, 2018 in Docker by Tyrion anex
• 8,700 points
6,508 views
0 votes
1 answer

How to run an image with volume on docker for windows?

Try : declaring the volume of container mounting the ...READ MORE

answered Sep 20, 2018 in Docker by Tyrion anex
• 8,700 points
899 views
0 votes
1 answer

How to update docker-compose on Docker for Windows?

Please check "version" value in the docker-compose.yml ...READ MORE

answered Sep 21, 2018 in Docker by Tyrion anex
• 8,700 points
3,584 views
+2 votes
1 answer
+2 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 58,020 points
2,739 views
0 votes
1 answer

How to make ‘Docker for windows’ use another VM besides MobylinuxVM?

docker-machine env can output the environment for cmd ...READ MORE

answered Aug 16, 2018 in Docker by Sophie may
• 10,620 points
1,298 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP