Skip to content

no matching entries in group file #7277

Description

@tcurdt

Description of the issue

Docker compose does not find some of the groups when setting a user.

Context information

Output of docker-compose version

ocker-compose version 1.21.0, build unknown
docker-py version: 3.4.1
CPython version: 3.7.3
OpenSSL version: OpenSSL 1.1.1d  10 Sep 2019

Output of docker version

Client:
 Version:           18.09.1
 API version:       1.39
 Go version:        go1.11.6
 Git commit:        4c52b90
 Built:             Tue, 03 Sep 2019 19:59:35 +0200
 OS/Arch:           linux/amd64
 Experimental:      false

Server:
 Engine:
  Version:          18.09.1
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.11.6
  Git commit:       4c52b90
  Built:            Tue Sep  3 17:59:35 2019
  OS/Arch:          linux/amd64
  Experimental:     false

Output of docker-compose config

services:
  alertmanager:
    command:
    - --config.file=/etc/alertmanager/config.yml
    - --storage.path=/alertmanager
    container_name: alertmanager
    image: prom/alertmanager:v0.20.0
    ports:
    - 127.0.0.1:9093:9093/tcp
    restart: unless-stopped
    user: nobody:docker
    volumes:
    - /srv/compose/alertmanager:/etc/alertmanager:ro
version: '3.6'

Steps to reproduce the issue

The above works with the group adm. Now I've added a new group

# grep docker /etc/group
docker:x:113:

Changing the config to

user: 'nobody:docker'

which then results in

ERROR: for alertmanager  Cannot start service alertmanager: linux spec user: unable to find group docker: no matching entries in group file

but using the gid works correctly

user: 'nobody:113'

Now the question is why does docker compose not find the group?
What group file does it check? It must be a different one.

Observed result

  1. resolves adm correctly.
  2. fails to resolve docker correctly.

Expected result

  1. resolves adm correctly.
  2. resolves docker correctly.

Stacktrace / full error message

ERROR: for 5f66885213d0_alertmanager  Cannot start service alertmanager: linux spec user: unable to find group docker: no matching entries in group file

ERROR: for alertmanager  Cannot start service alertmanager: linux spec user: unable to find group docker: no matching entries in group file
ERROR: Encountered errors while bringing up the project.

Additional information

This is on debian buster.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions