docker-volume-sshfs
docker-volume-sshfs copied to clipboard
ssh-agent possible?
Is it possible to use an ssh-agent that runs on the host system?
Perhaps defining a user at volume creation time -o SshAuthUser=myuser
. And reading that user's $SSH_AUTH_SOCK
at mount time? Does that make any sense @vieux ?
Changing the config.json
like this:
diff --git a/config.json b/config.json
index e396ffa..9f1009d 100644
--- a/config.json
+++ b/config.json
@@ -11,6 +11,13 @@
"value"
],
"value": "0"
+ },
+ {
+ "name": "SSH_AUTH_SOCK",
+ "settable": [
+ "value"
+ ],
+ "value": ""
}
],
"interface": {
@@ -53,6 +60,18 @@
"source"
],
"type": "bind"
+ },
+ {
+ "destination": "/tmp/sshauthsock",
+ "options": [
+ "rbind"
+ ],
+ "name": "sshauthsock",
+ "source": "",
+ "settable": [
+ "source"
+ ],
+ "type": "bind"
}
],
"network": {
...I am able to do stuff like this:
docker plugin disable h0tbird/sshfs
docker plugin set h0tbird/sshfs SSH_AUTH_SOCK=/tmp/sshauthsock/$(basename ${SSH_AUTH_SOCK}) sshauthsock.source=$(dirname ${SSH_AUTH_SOCK})
docker plugin enable h0tbird/sshfs
docker volume create -d h0tbird/sshfs -o sshcmd=${RUSER}@localhost:${RMOUNT} -o port=2222 -o workaround=rename mydata
Related PR: https://github.com/vieux/docker-volume-sshfs/pull/66