Already created docker group prevents package docker.io 1.13.1-0ubuntu1~16.04.2 install

Bug #1754562 reported by korziner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
docker.io (Ubuntu)
New
Undecided
Unassigned

Bug Description

Did add docker group before running installer.
This caused postinst script exit on the step of creating docker group.

ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: docker.io 1.13.1-0ubuntu1~16.04.2
ProcVersionSignature: Ubuntu 4.13.0-36.40~16.04.1-generic 4.13.13
Uname: Linux 4.13.0-36-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.15
Architecture: amd64
Date: Fri Mar 9 03:57:35 2018
ErrorMessage: подпроцесс установлен сценарий post-installation возвратил код ошибки 1
InstallationDate: Installed on 2018-03-04 (4 days ago)
InstallationMedia: Xubuntu 16.04.4 LTS "Xenial Xerus" - Release amd64 (20180228)
RelatedPackageVersions:
 dpkg 1.18.4ubuntu1.3
 apt 1.2.25
SourcePackage: docker.io
Title: package docker.io 1.13.1-0ubuntu1~16.04.2 failed to install/upgrade: подпроцесс установлен сценарий post-installation возвратил код ошибки 1
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
korziner (korziner) wrote :
Revision history for this message
Tianon Gravi (tianon) wrote :

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/3a633a712c8bbb863fe7e57ec132dd87a9c4eff7/daemon/listeners/group_unix.go#L20

https://github.com/opencontainers/runc/blob/69663f0bd4b60df09991c08812a60108003fa340/libcontainer/user/lookup_unix.go#L15

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.