This is an automated email from the ASF dual-hosted git repository.

mgrigorov pushed a commit to branch branch-1.12
in repository https://gitbox.apache.org/repos/asf/avro.git


The following commit(s) were added to refs/heads/branch-1.12 by this push:
     new afe6943c39 [AVRO-4194]: [build][docker] Ensure docker group exists 
(#3539)
afe6943c39 is described below

commit afe6943c39af27063dac29d72f22d92c92b7711f
Author: Ryan Skraba <[email protected]>
AuthorDate: Tue Nov 4 09:58:38 2025 +0100

    [AVRO-4194]: [build][docker] Ensure docker group exists (#3539)
    
    (cherry picked from commit a5b6f47b2a169f09024f8cf06c460caed8770132)
---
 build.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/build.sh b/build.sh
index 1939afca77..40d3955ec0 100755
--- a/build.sh
+++ b/build.sh
@@ -304,9 +304,10 @@ do
       DOCKER_IMAGE_NAME=${DOCKER_IMAGE_NAME:-"avro-build-$USER_NAME:latest"}
       {
         cat share/docker/Dockerfile
-        echo "ENV HOME /home/$USER_NAME"
+        echo "ENV HOME=/home/$USER_NAME"
+        echo "RUN getent passwd $USER_ID && userdel \$(getent passwd $USER_ID 
| cut -d: -f1)"
         echo "RUN getent group $GROUP_ID || groupadd -g $GROUP_ID $USER_NAME"
-        echo "RUN getent passwd $USER_ID || useradd -g $GROUP_ID -u $USER_ID 
-k /root -m $USER_NAME"
+        echo "RUN useradd -N -g $GROUP_ID -u $USER_ID -k /root -m $USER_NAME"
         echo "RUN mkdir -p /home/$USER_NAME/.m2/repository"
       } > Dockerfile
 

Reply via email to