I'm guessing you added the group as a non-system group?
(resulting in "addgroup: The group `docker' already exists and is not a system group. Exiting.")
I think it would probably be sane to add a check similar to the one Docker itself uses (namely whether "/etc/group" includes a line that starts with "docker:" -- ie, not using "getent group" since Docker parses the file directly).
something like:
| if ! grep -q '^docker:' /etc/group 2>/dev/null; then
| addgroup --system docker
| fi
I'm guessing you added the group as a non-system group?
(resulting in "addgroup: The group `docker' already exists and is not a system group. Exiting.")
I think it would probably be sane to add a check similar to the one Docker itself uses (namely whether "/etc/group" includes a line that starts with "docker:" -- ie, not using "getent group" since Docker parses the file directly).
something like:
| if ! grep -q '^docker:' /etc/group 2>/dev/null; then
| addgroup --system docker
| fi
---
See also:
https:/ /github. com/moby/ moby/blob/ 3a633a712c8bbb8 63fe7e57ec132dd 87a9c4eff7/ daemon/ listeners/ group_unix. go#L20
https:/ /github. com/opencontain ers/runc/ blob/69663f0bd4 b60df09991c0881 2a60108003fa340 /libcontainer/ user/lookup_ unix.go# L15