Alpine-autossh creates a persistent SSH connection in two steps.
- Launching the image
- Load the private key.
This image waits for a key (id_rsa) to be loaded (docker cp) into the /payload/ folder. This way, the key is kept from the image and decouples from the use of ssh-agent from the docker machine.
Project files and basic usage: https://github.com/ctroncoso/alpine-autossh