title: How to automate of entering pass-phrases into docker containers with bash scripts?
body: <p>I need to know how to automate the process of entering pass-phrases for private keys within docker containers.  </p>
  
  <p>I have a problem with setting up my web application container with docker. During in the setup process, I have to run <code>composer install</code> within my container and there is a dependency which needs to clone a private git repository. In that case it requires to use my private key and the key is secured with a pass-phrase. Because of that, when running <code>composer install</code> it needs to provide the pass-phrase to clone the repository. There is no issue with that flow when I running these commands within the container manually.   </p>
  
  <p>But I'm planning to automate this whole process with a bash script, and when I run my bash script within the host machine, it's not asking for the pass-phrase and exit with a "Permission denied (publickey)" error.  </p>
  
  <p>How do I automate the complete process with bash script without exiting from the script? I'm searching a way of something like that is prompting for the pass-phrase at the time of cloning that private repository or any other working solution.</p>