[
https://issues.apache.org/jira/browse/AVRO-4195?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated AVRO-4195:
---------------------------------
Labels: pull-request-available (was: )
> [build][docker] group does not exist building docker
> ----------------------------------------------------
>
> Key: AVRO-4195
> URL: https://issues.apache.org/jira/browse/AVRO-4195
> Project: Apache Avro
> Issue Type: Improvement
> Components: build
> Affects Versions: 1.11.5, 1.12.1
> Reporter: Ryan Skraba
> Assignee: Ryan Skraba
> Priority: Minor
> Labels: pull-request-available
> Fix For: 1.11.5, 1.12.1, 1.13.0
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> When I run a docker build, I get the following error:
> {code:java}
> => [20/26] RUN cd /opt ; wget https://dot.net/v1/dotnet-install.sh
> 23.1s
> => [21/26] RUN update-java-alternatives -s "java-1.21.*"
> 0.2s
> => [22/26] RUN getent group 1000 || groupadd -g 1000 ryanskraba
> 0.2s
> => [23/26] RUN getent passwd 1000 && userdel $(getent passwd 1000 | cut
> 0.2s
> => ERROR [24/26] RUN useradd -N -g 1000 -u 1000 -k /root -m ryanskraba
> 0.2s
> ------
>
> > [24/26] RUN useradd -N -g 1000 -u 1000 -k /root -m ryanskraba:
>
> 0.156 useradd: group '1000' does not exist
> ------
> Dockerfile:232
> --------------------
> 230 | RUN getent group 1000 || groupadd -g 1000 ryanskraba
> 231 | RUN getent passwd 1000 && userdel $(getent passwd 1000 | cut -d:
> -f1)
> 232 | >>> RUN useradd -N -g 1000 -u 1000 -k /root -m ryanskraba
> 233 | RUN mkdir -p /home/ryanskraba/.m2/repository
> 234 | RUN chown -R --reference=/home/ryanskraba /home/ryanskraba/.m2/
> {code}
> It looks like the userdel command deletes the user group when there is only
> one user. This was refined recently and probably works if the local user has
> any id other than 1000 (also assigned to the default *ubuntu* user).
> There's proobably a more profound fix for this, but we can probably just
> reorder the group check and the user check.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)