mirror of
https://github.com/corda/corda.git
synced 2025-04-04 09:59:23 +00:00
add -r option to docker/build.sh for executing as root
This commit is contained in:
parent
0134a9e815
commit
29f32859da
@ -8,6 +8,8 @@ if test $# -eq 0; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
THE_USER="-u $(id -u "${USER}")"
|
||||
|
||||
while test $# -gt 1 ; do
|
||||
key="$1"
|
||||
case $key in
|
||||
@ -16,6 +18,10 @@ while test $# -gt 1 ; do
|
||||
CONTAINER="$1"
|
||||
shift
|
||||
;;
|
||||
-r|--root)
|
||||
shift
|
||||
THE_USER=
|
||||
;;
|
||||
--)
|
||||
shift
|
||||
break
|
||||
@ -32,4 +38,4 @@ fi
|
||||
|
||||
DIR=$(cd $(dirname "$0") && cd .. && pwd)
|
||||
|
||||
docker run --rm -i -t -v "${DIR}":/var/avian -u $(id -u "${USER}") "${CONTAINER}" "${@}"
|
||||
docker run --rm -i -t -v "${DIR}":/var/avian ${THE_USER} "${CONTAINER}" "${@}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user