Open ethanfel opened 1 month ago
I was able to workaround it by swapping $GID and $UID in the docker file using 1000
try
RUN if getent group $GID; then \ GID=$(($(getent group | awk -F: '{if ($3>=1000) print $3}' | sort -n | tail -1) + 1)); \ fi && \ groupadd --gid $GID user RUN if ! getent passwd $UID; then \ useradd --no-log-init --create-home --shell /bin/bash --uid $UID --gid $GID user; \ else \ UID=$(($(getent passwd | awk -F: '{if ($3>=1000) print $3}' | sort -n | tail -1) + 1)); \ useradd --no-log-init --create-home --shell /bin/bash --uid $UID --gid $GID user; \ fi USER user ENV HOME=/home/user WORKDIR $HOME RUN mkdir $HOME/.cache $HOME/.config && chmod -R 777 $HOME
hello, Using the Linux docker, running the setup-docker.sh
Step 11/48 : RUN groupadd --gid $GID user ---> Running in 3efa27e26494 groupadd: GID '0' already exists The command '/bin/sh -c groupadd --gid $GID user' returned a non-zero code: 4