HADOOP-14739. Update start-build-env.sh and build instruction for docker for Mac instead of docker toolbox. Contributed by Dinesh Chitlangia.
This commit is contained in:
parent
0123e5197b
commit
10b5da85fa
10
BUILDING.txt
10
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.
|
of the provided Docker config.
|
||||||
This requires a recent version of docker (1.4.1 and higher are known to work).
|
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:
|
Install Docker and run this command:
|
||||||
|
|
||||||
$ ./start-build-env.sh
|
$ ./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
|
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.
|
and all required tools for testing and building have been installed and configured.
|
||||||
|
|
||||||
|
|
|
@ -21,9 +21,14 @@ cd "$(dirname "$0")" # connect to root
|
||||||
|
|
||||||
docker build -t hadoop-build dev-support/docker
|
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
|
if [ "$(uname -s)" = "Linux" ]; then
|
||||||
USER_NAME=${SUDO_USER:=$USER}
|
|
||||||
USER_ID=$(id -u "${USER_NAME}")
|
|
||||||
GROUP_ID=$(id -g "${USER_NAME}")
|
GROUP_ID=$(id -g "${USER_NAME}")
|
||||||
# man docker-run
|
# man docker-run
|
||||||
# When using SELinux, mounted directories may not be accessible
|
# When using SELinux, mounted directories may not be accessible
|
||||||
|
@ -51,10 +56,6 @@ if [ "$(uname -s)" = "Linux" ]; then
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
else # boot2docker uid and gid
|
|
||||||
USER_NAME=$USER
|
|
||||||
USER_ID=1000
|
|
||||||
GROUP_ID=50
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
docker build -t "hadoop-build-${USER_ID}" - <<UserSpecificDocker
|
docker build -t "hadoop-build-${USER_ID}" - <<UserSpecificDocker
|
||||||
|
|
Loading…
Reference in New Issue