mirror of
https://github.com/stucki/docker-lineageos
synced 2025-01-09 17:39:47 -05:00
privileged is now switchable
This commit is contained in:
parent
5f65d68abd
commit
b9ac69cf57
22
run.sh
22
run.sh
@ -9,6 +9,26 @@ CONTAINER=cyanogenmod
|
||||
REPOSITORY=stucki/cyanogenmod
|
||||
TAG=cm-13.0
|
||||
FORCE_BUILD=0
|
||||
PRIVILEGED=
|
||||
|
||||
while [[ $# > 0 ]]
|
||||
do
|
||||
key="$1"
|
||||
|
||||
case $key in
|
||||
-r|--rebuild)
|
||||
FORCE_BUILD=1
|
||||
;;
|
||||
-p|--privileged)
|
||||
PRIVILEGED="--privileged -v /dev/bus/usb:/dev/bus/usb"
|
||||
;;
|
||||
*)
|
||||
shift # past argument or value
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
|
||||
done
|
||||
|
||||
# Create shared folders
|
||||
[[ -e "$SOURCE" ]] || mkdir -p $SOURCE
|
||||
@ -42,7 +62,7 @@ if [[ $IS_RUNNING == "true" ]]; then
|
||||
elif [[ $IS_RUNNING == "false" ]]; then
|
||||
docker start -i $CONTAINER
|
||||
else
|
||||
docker run --privileged -v $SOURCE:$CONTAINER_HOME/android -v $CCACHE:/srv/ccache -v /dev/bus/usb:/dev/bus/usb -i -t --name $CONTAINER $REPOSITORY:$TAG
|
||||
docker run $PRIVILEGED -v $SOURCE:$CONTAINER_HOME/android -v $CCACHE:/srv/ccache -i -t --name $CONTAINER $REPOSITORY:$TAG
|
||||
fi
|
||||
|
||||
exit $?
|
||||
|
@ -9,4 +9,4 @@ fi
|
||||
export USER="cmbuild"
|
||||
|
||||
# Launch screen session
|
||||
screen -s /bin/bash
|
||||
/bin/bash --login
|
||||
|
Loading…
x
Reference in New Issue
Block a user