-
Notifications
You must be signed in to change notification settings - Fork 103
Conversation
5de841b
to
3988740
Compare
6204c10
to
8f251b0
Compare
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
Looks reasonable. Using a mount to get the keys in! |
It works perfect, thanks for the contribution. |
@marcelo-ochoa I'll merge today, push the v1.3 image today and if everything go as planned, I'll update latest -> 1.3 next week. |
Great!!! Thanks a lot. In the meantime I'll configure my volumes using vieux/sshfs:next compile from sources. |
The only question I'd have is why not mount it to My use-case is probably somewhat unique, but I basically have an in-house ci/cd system modeled after Bitbucket's Pipelines with an added extension that allows me to specify mounts in the docker containers to push builds to for qa and production deployments (see example below). The simpler I can keep this, the better off we are. With the yaml config below, along with the simple change I mentioned in my issue, I can do all of the ssh settings in a ssh_config file which is mounted in If image: deploy-image
pipelines:
branches:
stable:
- step:
mounts:
- linux01
script:
- deploy -d /mnt/linux01/srv/www/myapp
definitions:
mounts:
linux01:
type: linux
host: linux01.mydomain.com
path: / |
@mattzuba how about like this ? |
Yup, I think that would be perfect! I already left work for the day so I can't test it out right now, but I don't see why it wouldn't work! |
Dockerfile
Outdated
@@ -10,6 +10,6 @@ CMD ["/go/bin/docker-volume-sshfs"] | |||
|
|||
FROM alpine | |||
RUN apk update && apk add sshfs | |||
RUN mkdir -p /run/docker/plugins /mnt/state /mnt/volumes | |||
RUN mkdir -p /run/docker/plugins /mnt/state /mnt/volumes .ssh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be adjusted to be /root/.ssh
instead of just .ssh
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll take a look, I'm not sure it's needed since the tests are passing right now
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
I tested latest commit and it works without passing the argument:
note the property "Source": "", after calling plugin set it is defined "Source": "/root/.ssh/" |
well this simple patch makes Source property with a default value :)
|
I'm not really fond of this for 2 reasons :
I prefer users to be explicit when mounting ssh keys into the plugin, I
think it's safer.
It won't work when users other than root will use the plugin.
On Sep 2, 2017 2:12 PM, "marcelo-ochoa" <notifications@github.com> wrote:
well this simple patch makes Source property with a default value :)
diff --git a/config.json b/config.json
index e396ffa..6852b4b 100644
--- a/config.json
+++ b/config.json
@@ -52,6 +52,7 @@
"settable": [
"source"
],
+ "Source": "/root/.ssh/",
"type": "bind"
}
],
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#33 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA_BR_jS4AEaExzgIi7sbwHZK4ocexHTks5secSmgaJpZM4PDLlN>
.
|
I agree on the safety aspect, forcing plugin installers to be explicit in
where the keys and config is located is definitely the better option, and
it's documented on how to specify it when enabling the plugin as well.
…On Sat, Sep 2, 2017, 2:46 PM Victor Vieux ***@***.***> wrote:
I'm not really fond of this for 2 reasons :
I prefer users to be explicit when mounting ssh keys into the plugin, I
think it's safer.
It won't work when users other than root will use the plugin.
On Sep 2, 2017 2:12 PM, "marcelo-ochoa" ***@***.***> wrote:
well this simple patch makes Source property with a default value :)
diff --git a/config.json b/config.json
index e396ffa..6852b4b 100644
--- a/config.json
+++ b/config.json
@@ -52,6 +52,7 @@
"settable": [
"source"
],
+ "Source": "/root/.ssh/",
"type": "bind"
}
],
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<
#33 (comment)
>,
or mute the thread
<
https://github.com/notifications/unsubscribe-auth/AA_BR_jS4AEaExzgIi7sbwHZK4ocexHTks5secSmgaJpZM4PDLlN
>
.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#33 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABbOua63-MS-QlmaYTZmpAhUR2bsLd84ks5secy7gaJpZM4PDLlN>
.
|
OK, my point is to provide two step installing. |
Forget the diff about config.json file, I found that if Source property is set in that file then is not possible to change at run-time with: |
close #24 #22