Problem: In order to install a dependency using pip that is hosted in a private git repository, an ssh key is needed. When running a docker build command the steps executed inside the Dockerfile are executed in a different shell from the CircleCI commands and they do not have access to the ~/.ssh/id_rsa .
Solution: The private key can be passed to the docker build command as an argument to the Dockerfile and with some Linux commandline magic it can be properly formatted for use by git.
- setup_remote_docker: