小编var*_*ump的帖子

Ubuntu Docker 容器中的 Virtualbox 缺少内核标头

我正在尝试在 Docker 中运行 virtualbox 以使用 vagrant。我尝试使用 Ubuntu 来实现这一目标。这是我的 Dockerfile:

FROM ubuntu

RUN apt-get update
RUN apt-get install -y software-properties-common python-software-properties
RUN add-apt-repository 'deb http://download.virtualbox.org/virtualbox/debian trusty contrib'
RUN add-apt-repository 'deb http://de.archive.ubuntu.com/ubuntu trusty main restricted universe multiverse'
RUN apt-get update
RUN apt-get install -y wget linux-headers-generic
RUN wget http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -

RUN apt-get update
RUN apt-get install -y gcc virtualbox dkms virtualbox-dkms
RUN wget https://dl.bintray.com/mitchellh/vagrant/vagrant_1.7.1_x86_64.deb
RUN dpkg -i vagrant_1.7.1_x86_64.deb
Run Code Online (Sandbox Code Playgroud)

如果我然后运行virtualbox,我会得到:

WARNING: The character device /dev/vboxdrv does …
Run Code Online (Sandbox Code Playgroud)

virtualbox ubuntu vagrant docker

5
推荐指数
1
解决办法
3717
查看次数

标签 统计

docker ×1

ubuntu ×1

vagrant ×1

virtualbox ×1