Browse Source

Fix an issue with the docker build script under Docker for Mac

Kevin Lange 4 years ago
parent
commit
541c3187a1
1 changed files with 5 additions and 0 deletions
  1. 5 0
      util/build-travis.sh

+ 5 - 0
util/build-travis.sh

@@ -7,6 +7,11 @@ chmod o+x /root
 # Who owns this directory?
 NEWUID=`stat -c '%u' .`
 
+if [[ "$NEWUID" == "0" ]]; then
+    echo "Are you running this on Docker for Mac? Owner UID is 0, going to use 501 instead."
+    NEWUID=501
+fi
+
 # Create a fake user with this name
 useradd -u $NEWUID local