github.com/vmware/go-vcloud-director/v2@v2.24.0/support/Dockerfile.jenkins (about) 1 FROM golang:1.11.4 2 3 ARG build_user=root 4 ARG build_uid=0 5 ARG build_gid=0 6 7 ENV HOME /home/${build_user} 8 ENV USER ${build_user} 9 10 # Creates the build user with the provided UID/GID 11 # values to prevent filesystem permissions issues 12 RUN if [ "${build_uid}" != "0" ]; then \ 13 groupadd -g ${build_gid} ${build_user}; \ 14 useradd -c "Build user" -d $HOME -u ${build_uid} \ 15 -g ${build_gid} -m ${build_user}; \ 16 fi 17 18 # Switch to the new build user 19 USER ${build_user}