Skip to content

Commit

Permalink
docker: disable /dev mapping into docker for ubunutu-14.04 env.
Browse files Browse the repository at this point in the history
  • Loading branch information
ycool committed Aug 14, 2019
1 parent 344e5d8 commit 71b9cdf
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions docker/scripts/dev_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -184,15 +184,22 @@ fi

IMG=${DOCKER_REPO}:$VERSION


function local_volumes() {
set +x
# Apollo root and bazel cache dirs are required.
volumes="-v $APOLLO_ROOT_DIR:/apollo \
-v $HOME/.cache:${DOCKER_HOME}/.cache"
case "$(uname -s)" in
Linux)
volumes="${volumes} -v /dev:/dev \
-v /media:/media \
case "$(lsb_release -r | cut -f2)" in
14.04)
volumes="${volumes} "
;;
*)
volumes="${volumes} -v /dev:/dev "
;;
esac
volumes="${volumes} -v /media:/media \
-v /tmp/.X11-unix:/tmp/.X11-unix:rw \
-v /etc/localtime:/etc/localtime:ro \
-v /usr/src:/usr/src \
Expand All @@ -204,9 +211,9 @@ function local_volumes() {
;;
esac
echo "${volumes}"
set -x
}


function main(){

if [ "$LOCAL_IMAGE" = "yes" ];then
Expand Down

0 comments on commit 71b9cdf

Please sign in to comment.