Here's the entrypoint of my Dockerfile:
ENTRYPOINT ssh-agent bash\ && ssh-add directory/id_rsa
If I run my docker container with
docker run my_conatiner -rm, I get:
Could not open a connection to your authentication agent.
instead of being prompted to insert the private key password.
If I run, however, with
ENTRYPOINT /bin/bash, and paste the two commands manually, I get prompted to insert the password for the private key.