##// END OF EJS Templates
dockerrpm: run docker build process as the current user, not as root...
Mads Kiilerich -
r22440:cf7b5c01 default
parent child Browse files
Show More
@@ -24,6 +24,12 b' DFILE="$ROOTDIR/contrib/docker/$PLATFORM'
24
24
25 CONTAINER="hg-dockerrpm-$PLATFORM"
25 CONTAINER="hg-dockerrpm-$PLATFORM"
26
26
27 $DOCKER build --tag $CONTAINER - < $DFILE
27 DBUILDUSER=build
28 $DOCKER run --rm -v $ROOTDIR:/hg $CONTAINER bash -c \
28 (
29 cat $DFILE
30 echo RUN groupadd $DBUILDUSER -g `id -g`
31 echo RUN useradd $DBUILDUSER -u `id -u` -g $DBUILDUSER
32 ) | $DOCKER build --tag $CONTAINER -
33
34 $DOCKER run -u $DBUILDUSER --rm -v $ROOTDIR:/hg $CONTAINER bash -c \
29 "cp -a hg hg-build; cd hg-build; make clean local $PLATFORM; cp packages/$PLATFORM/* /hg/packages/$PLATFORM/"
35 "cp -a hg hg-build; cd hg-build; make clean local $PLATFORM; cp packages/$PLATFORM/* /hg/packages/$PLATFORM/"
General Comments 0
You need to be logged in to leave comments. Login now