-
-
Notifications
You must be signed in to change notification settings - Fork 35
Please consider adding support for setting the mode for secrets #41
Comments
Does Swarm support that? If so, please propose how you'd like to see that change implemented. |
Yes, swarm supports that. The https://docs.docker.com/engine/reference/commandline/service_create/#create-a-service-with-secrets
In the [PR that added](- #30 (comment) Anyway, I am just wishing I could pass values for the UID/GID/Mode that seem to be set here. I am sorry I can't provide you a PR, but I don't know go, and am low on time at the moment to work on learning it. |
If I spent my time building this feature for you, could you and would you use it? |
.. |
Just FYI |
@TakafumiKoyama thanks for sharing your use-case. A better workaround would be to chmod in the container before using it perhaps? Contributions are welcome, if you have a commercial use for this, feel free to hire me to build the feature. [email protected] |
@alexellis thanks for offering. As for the workaround, chmod did not work because the secret is mounted as read-only filesystem. $ echo abc | docker secret create foo -
2x6daavnaq3pomtpty4ebxsu6
$ jaas run --remove --image ubuntu --secret foo --command "chmod 0400 /run/secrets/foo"
Service created: hungry_tereshkova (uacc10sozpvbd61c1ywyq81r2)
ID: uacc10sozpvbd61c1ywyq81r2 Update at: 2019-12-11 14:24:58.406516025 +0000 UTC
..........
Exit code: 1
State: failed
Printing service logs
h2019-12-11T14:25:03.183427890Z chmod: changing permissions of '/run/secrets/foo': Read-only file system
Removing service... |
I want to run job, that will use do a git pull via ssh. I pass in the ssh private key via a secret ssh fails, since the permissions are 0444. Other software things that use secrets might check the permissions.
The text was updated successfully, but these errors were encountered: