1
0
mirror of https://github.com/rancher/os.git synced 2025-09-02 07:15:41 +00:00

use --device=/dev/kvm:/dev/kvm instead of --privileged to enable KVM in docker

This commit is contained in:
Ivan Mikushin
2015-09-09 14:31:58 +05:00
parent 9031e27174
commit 0c196f557b

View File

@@ -8,8 +8,8 @@ if [ -n "$BIND_DIR" ]; then
fi
DOCKER_ARGS="-t -v $BIND_DIR:/go/src/github.com/rancherio/os"
fi
if [ -c /dev/kvm ] || [ "${PRIVILEGED}" == "1" ]; then
DOCKER_ARGS="${DOCKER_ARGS} --privileged"
if [ -c /dev/kvm ] || [ "${KVM}" == "1" ]; then
DOCKER_ARGS="${DOCKER_ARGS} --device=/dev/kvm:/dev/kvm"
fi
NAME=ros-build