This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1285045 - Docker does not have a set/defined UID/GID
Docker does not have a set/defined UID/GID
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: docker (Show other bugs)
7.3
Unspecified Unspecified
unspecified Severity high
: rc
: ---
Assigned To: Daniel Walsh
atomic-bugs@redhat.com
: Extras, Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-24 13:06 EST by Eric Rich
Modified: 2016-06-07 11:01 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1285041
Environment:
Last Closed: 2016-06-07 11:01:17 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Eric Rich 2015-11-24 13:06:21 EST
Description of problem:

The docker service does not have a uniform / set UID/GID like other services. 

How reproducible: 100% 

Steps to Reproduce:
1. Install docker

Actual results:

A UID / GID is set based on what is avalabe at the time of the RPM install. 

Expected results:

The UID/GID should be consistant as it is with other services out of /usr/share/doc/setup/uidgid

Additional info:

# grep docker /etc/passwd
dockerroot:x:997:995:Docker User:/var/lib/docker:/sbin/nologin

# rpm -q docker --scripts
preinstall scriptlet (using /bin/sh):
getent passwd dockerroot > /dev/null || /usr/sbin/useradd -r -d /var/lib/docker -s /sbin/nologin -c "Docker User" dockerroot
...
Comment 1 Daniel Walsh 2015-11-24 13:20:18 EST
How does one go about assigning a persistant UID for docker?
Comment 2 Colin Walters 2015-11-24 13:45:54 EST
Er, no.  Not every RPM gets a fixed uid, it simply would not scale.

If you're using RPMs-assembled-on-client (e.g. yum) you can simply `useradd` before installing the RPM and choose whatever name -> uid mappings you desire.

If you're using Atomic Host, this is done for you.
Comment 3 Daniel Walsh 2015-11-24 13:48:02 EST
Great Colin, thanks, did not know that info.
Comment 5 Daniel Walsh 2015-11-24 14:44:53 EST
Currently the dockerroot user is not used by anything other then locally on the system to separate root user within the container from root user on the host.  Theoretically this should never leave the host,  but I guess could if you were using shared volumes into containers which you wanted owned by dockerroot.
Comment 8 Daniel Walsh 2016-06-03 09:02:07 EDT
Eric any movement on this?
Comment 9 Eric Rich 2016-06-06 12:19:41 EDT
(In reply to Daniel Walsh from comment #8)
> Eric any movement on this?

Dan I'm confused on the question. The bug was re-opened, given that we have an inconsistency with products that do and do not set UID/GID values for services. 

Does engineering have any objections to setting a default value for the UID/GID for docker?
Comment 10 Daniel Walsh 2016-06-07 11:01:17 EDT
I agree with Colin that there is no need to make this consistent across docker instances. we are not currently sharing it over shared network storage. So I am closing this as wontfix.

Note You need to log in before you can comment on or make changes to this bug.