docker / docker-py

A Python library for the Docker Engine API
https://docker-py.readthedocs.io/
Apache License 2.0
6.82k stars 1.67k forks source link

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

Open dimaspivak opened 7 years ago

dimaspivak commented 7 years ago

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 -vpwd:/src docker-sdk-python-docs sphinx-build docs docs/_build results in docs being generated correctly.

soulaimanassikiou commented 4 years ago

I am having the same error.

Does anyone know a solution?