[sdocker]make sure to have same uid as current user

This commit is contained in:
Mathieu Maret 2017-01-19 13:46:08 +01:00
parent f879b08f7a
commit fb16fe1f9c

View File

@ -214,7 +214,7 @@ sdocker (){
img=$(docker ps -a | grep $1 | awk '{print $1}' | head -1); img=$(docker ps -a | grep $1 | awk '{print $1}' | head -1);
if [ -z $img ]; then if [ -z $img ]; then
echo "Running a new container" echo "Running a new container"
docker run ${AOSP_ARGS} ${=SSH_AUTH_ARGS} -v ${AOSP_IMAGE}:/aosp/Project $1 docker run ${AOSP_ARGS} ${=SSH_AUTH_ARGS} -v ${AOSP_IMAGE}:/aosp/Project --user="$(id -u):$(id -g)" $1
else else
echo "Starting $img" echo "Starting $img"
docker start -i -a $img docker start -i -a $img