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:
@@ -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
|
||||
|
Reference in New Issue
Block a user