Installing Private Packages in Docker Image - Notes - 20/08/2023

Personal Notes

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