File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -31,8 +31,6 @@ CMAKE_ARCH="${CMAKE_ARCH:-"$ARCH"}"
31
31
cwd=" $PWD "
32
32
repo_root=" $( readlink -f " $( dirname " ${BASH_SOURCE[0]} " ) " /..) "
33
33
34
- # needed to keep user ID in and outside Docker in sync to be able to write to workspace directory
35
- uid=" $( id -u) "
36
34
image=zsync2-build:" $ARCH "
37
35
38
36
# building local image to "cache" installed dependencies for subsequent builds
@@ -47,6 +45,11 @@ docker build \
47
45
tty_args=()
48
46
if [ -t 0 ]; then tty_args+=(" -t" ); fi
49
47
48
+ # run the build with the current user to
49
+ # a) make sure root is not required for builds
50
+ # b) allow the build scripts to "mv" the binaries into the /out directory
51
+ uid=" $( id -u) "
52
+
50
53
# mount workspace read-only, trying to make sure the build doesn't ever touch the source code files
51
54
# of course, this only works reliably if you don't run this script from that directory
52
55
# but it's still not the worst idea to do so
You can’t perform that action at this time.
0 commit comments