wodby / drupal-php

PHP docker container image for Drupal
https://wodby.com/stacks/drupal
MIT License
60 stars 80 forks source link

Volume Mounting SSH Keys #58

Closed hpza closed 6 years ago

hpza commented 6 years ago

Hi,

just started using docker4drupal, great tool, thanks!

I would lile to mount my ~/.ssh on /home/wodby/.ssh and I added

volumes;
  - /home/haza/.ssh:/home/wodby/.ssh:ro

in docker-compose.yml

Unfortunately that doesn.t work. I get the following error:

/docker-entrypoint.sh: line 13: /home/wodby/.ssh/config: Read-only file system

The reasson I want to do that, is to use my drush aliases for doing syncs with my staging servers.

How can I achieve this?

Thanks, Hans-Peter

csandanov commented 6 years ago

You can use SSH_PRIVATE_KEY (example from tests), we'll change it in future because mounting is more secure

csandanov commented 6 years ago

Actually, if you mount only keys without entire ~/.ssh it should work too, you have an error because we use a template for ssh client config

hpza commented 6 years ago

Thanks, mounting the keys only works! Would be nice to be able to mount the '.ssh' sometime in the future. Regards Hans-Peter