docker run helper script (#6270)

This commit is contained in:
Daniel Agar
2017-01-08 13:45:28 -05:00
committed by GitHub
parent 7df3b4ae71
commit defaf7f5e5
4 changed files with 31 additions and 25 deletions
+15
View File
@@ -0,0 +1,15 @@
#! /bin/bash
PWD=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
SRC_DIR=$PWD/../
CCACHE_DIR=${HOME}/.ccache
mkdir -p ${CCACHE_DIR}
docker run -it --rm -w ${SRC_DIR} \
-v ${SRC_DIR}:${SRC_DIR}:rw \
-v /tmp/.X11-unix:/tmp/.X11-unix:ro \
-v ${CCACHE_DIR}:${CCACHE_DIR}:rw \
-e CCACHE_DIR=${CCACHE_DIR} \
-e LOCAL_USER_ID=`id -u` \
px4io/px4-dev-nuttx:2017-01-07 /bin/bash -c "$@"