New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cannot specify username/group name of docker config when creating docker service #36440
Comments
Old but still seems relevant using latest version:
... the doc states: "You can set the ownership ( |
Looks like the API accepts strings for these properties, but the daemon expects numeric values; moby/daemon/container_operations_unix.go Lines 264 to 278 in e222d2d
(there's currently no translation from user/group names to uid/gid, based on users known to the container) Not sure if that was originally designed to be included, but didn't get implemented, if this was for "future enhancement", or if it just slipped through when creating the documentation. Perhaps @ehazlett recalls? (I didn't dig into history yet) At least for now, the docs should be updated to reflect the current state |
Getting similar problem when trying to pass secret by API. Not works: Server Version: 20.10.14 |
Description
I'm trying to specify user and group ownership of a docker config during creating
a docker service in swarm mode. Per docker config doc, I can use uid/gid or user/group name
as value of
uid=
/gid=
option. But based on my test, it seems that only uid/gidis accepted, otherwise the service fails with
starting container failed: strconv.Atoi: parsing "<user/group-name-here>": invalid syntax
error.Steps to reproduce the issue:
foo.conf
as docker config.Describe the results you received:
Service failed to start.
docker service ps nginx
shows the following:Describe the results you expected:
Service starts successfully.
Additional information you deem important (e.g. issue happens only occasionally):
With uid/gid rather than name, service starts successfully.
Output of
docker version
:Output of
docker info
:Additional environment details (AWS, VirtualBox, physical, etc.):
The text was updated successfully, but these errors were encountered: