Installing Private Packages in Docker Image - Notes

May 27, 2021    #python   #docker   #ssh-forwarding   #ssh  

Quick notes about how to forward an ssh agent and other tricks regarding the installation of python packages.

Using SSH Forwarding

Exporting the $SSH_AUTH_SOCK environment variable in the image.

$ docker run -rm -t -i -v $(dirname $SSH_AUTH_SOCK) -e SSH_AUTH_SOCK=$SSH_AUTH_SOCK ubuntu /bin/bash

Or in the environment section of a compose file.

environment:
  SSH_AUTH_SOCK: $SSH_AUTH_SOCK

Eventual Issues with that

Caveats

References