docker / docker/docker-py

"addgroup: The GID `20' is already in use." when running `make docs`

Open
#1,714 1 comment 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
7.2k
Forks
1.7k
Avg merge
13d 8h
Merged PRs (30d)
2

Description

Running from the project root on a machine with Docker for Mac:

$ make docs
docker build -t docker-sdk-python-docs -f Dockerfile-docs --build-arg uid=501 --build-arg gid=20 .
Sending build context to Docker daemon 1.023 MB
Step 1/8 : FROM python:3.5
3.5: Pulling from library/python
ad74af05f5a2: Pull complete 
2b032b8bbe8b: Pull complete 
a9a5b35f6ead: Pull complete 
3245b5a1c52c: Pull complete 
032924b710ba: Pull complete 
c5e6dddd2c23: Pull complete 
d77ca9353ac4: Pull complete 
6adf7de7a4bd: Pull complete 
Digest: sha256:dab79666dd592b82aafd1e0d97c0ac0bbddcb77b5780680a28bc2707b72d244b
Status: Downloaded newer image for python:3.5
 ---> 42a18ddd0812
Step 2/8 : ARG uid=1000
 ---> Running in 0225ced463cc
 ---> 8b1806d60fde
Removing intermediate container 0225ced463cc
Step 3/8 : ARG gid=1000
 ---> Running in fcb9b57f6425
 ---> ccf98379dc56
Removing intermediate container fcb9b57f6425
Step 4/8 : RUN addgroup --gid $gid sphinx  && useradd --uid $uid --gid $gid -M sphinx
 ---> Running in f25fdd11665b
addgroup: The GID `20' is already in use.
The command '/bin/sh -c addgroup --gid $gid sphinx  && useradd --uid $uid --gid $gid -M sphinx' returned a non-zero code: 1
make: *** [build-docs] Error 1

Changing the gid build arg to a different value and then manually running the Makefile's docker run --rm -it -v pwd:/src docker-sdk-python-docs sphinx-build docs docs/_build results in docs being generated correctly.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with Dockerfile-docs and the docs-related targets in the Makefile, then reproduce make docs on Docker for Mac using the shown uid and gid arguments. Check the failing addgroup and useradd step; done means the image builds without the GID conflict and the documented docker run command generates the docs successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python
Domain
build-system, documentation
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.