hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aajis...@apache.org
Subject hadoop git commit: HADOOP-14739. Update start-build-env.sh and build instruction for docker for Mac instead of docker toolbox. Contributed by Dinesh Chitlangia.
Date Tue, 20 Nov 2018 14:59:58 GMT
Repository: hadoop
Updated Branches:
  refs/heads/trunk 0123e5197 -> 10b5da85f


HADOOP-14739. Update start-build-env.sh and build instruction for docker for Mac instead of
docker toolbox. Contributed by Dinesh Chitlangia.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/10b5da85
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/10b5da85
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/10b5da85

Branch: refs/heads/trunk
Commit: 10b5da85fab41c68c2c223a3a8749be9719908f6
Parents: 0123e51
Author: Akira Ajisaka <aajisaka@apache.org>
Authored: Tue Nov 20 23:59:08 2018 +0900
Committer: Akira Ajisaka <aajisaka@apache.org>
Committed: Tue Nov 20 23:59:49 2018 +0900

----------------------------------------------------------------------
 BUILDING.txt       | 10 +---------
 start-build-env.sh | 13 +++++++------
 2 files changed, 8 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/10b5da85/BUILDING.txt
----------------------------------------------------------------------
diff --git a/BUILDING.txt b/BUILDING.txt
index d35e3af..d781c2c 100644
--- a/BUILDING.txt
+++ b/BUILDING.txt
@@ -26,19 +26,11 @@ The easiest way to get an environment with all the appropriate tools is
by means
 of the provided Docker config.
 This requires a recent version of docker (1.4.1 and higher are known to work).
 
-On Linux:
+On Linux / Mac:
     Install Docker and run this command:
 
     $ ./start-build-env.sh
 
-On Mac:
-    First make sure Virtualbox and docker toolbox are installed.
-    You can use docker toolbox as described in http://docs.docker.com/mac/step_one/.
-    $ docker-machine create --driver virtualbox \
-                            --virtualbox-memory "4096" hadoopdev
-    $ eval $(docker-machine env hadoopdev)
-    $ ./start-build-env.sh
-
 The prompt which is then presented is located at a mounted version of the source tree
 and all required tools for testing and building have been installed and configured.
 

http://git-wip-us.apache.org/repos/asf/hadoop/blob/10b5da85/start-build-env.sh
----------------------------------------------------------------------
diff --git a/start-build-env.sh b/start-build-env.sh
index e3d9f2f..08cdfb0 100755
--- a/start-build-env.sh
+++ b/start-build-env.sh
@@ -21,9 +21,14 @@ cd "$(dirname "$0")" # connect to root
 
 docker build -t hadoop-build dev-support/docker
 
+USER_NAME=${SUDO_USER:=$USER}
+USER_ID=$(id -u "${USER_NAME}")
+
+if [ "$(uname -s)" = "Darwin" ]; then
+  GROUP_ID=100
+fi
+
 if [ "$(uname -s)" = "Linux" ]; then
-  USER_NAME=${SUDO_USER:=$USER}
-  USER_ID=$(id -u "${USER_NAME}")
   GROUP_ID=$(id -g "${USER_NAME}")
   # man docker-run
   # When using SELinux, mounted directories may not be accessible
@@ -51,10 +56,6 @@ if [ "$(uname -s)" = "Linux" ]; then
       done
     fi
   fi
-else # boot2docker uid and gid
-  USER_NAME=$USER
-  USER_ID=1000
-  GROUP_ID=50
 fi
 
 docker build -t "hadoop-build-${USER_ID}" - <<UserSpecificDocker


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message