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

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


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

commit 8d44f1d2040f17f84785db8b611adec2746bd2da
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 | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/build.sh b/build.sh
index d30c6b142c..42ac418f33 100755
--- a/build.sh
+++ b/build.sh
@@ -305,9 +305,12 @@ 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"
+        echo "RUN chown -R --reference=/home/$USER_NAME /home/$USER_NAME/.m2/"
       } > Dockerfile
       # Include the ruby gemspec for preinstallation.
       # shellcheck disable=SC2086

Reply via email to