Run VirtualBox on Docker to also run Genymotion

0

I'm trying to install Genymotion in Docker, but I'm having problems with the Virtual Machine.

This is my DockerFile:

FROM     ubuntu:15.04
MAINTAINER paulo.ch8

RUN apt-get update &&  \
    apt-get install -y wget && \
#                       qtwebkit && \
    echo 'deb http://download.virtualbox.org/virtualbox/debian trusty contrib' >> /etc/apt/sources.list && \
    wget http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O /tmp/oracle_vbox.asc -q && \
    apt-key add /tmp/oracle_vbox.asc && \
    apt-get update &&  \
    apt-get install -y virtualbox-4.3 && \
    apt-get clean

RUN apt-get update &&  \
    apt-get install -y bzip2

RUN apt-get install -y libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev
RUN apt-get install -y linux-headers-3.19.0-22-generic
# RUN apt-get install -y lspci
RUN /etc/init.d/vboxdrv setup

# Install GenyMotion
ADD genymotion-2.5.2_x64.bin /tmp/genymotion.bin


RUN echo 'y' | /tmp/genymotion.bin -d /genymotion/

# RUN /usr/sbin/useradd --create-home --home-dir /home/nonroot --shell /bin/bash nonroot && \
#     /usr/sbin/adduser nonroot sudo
# USER nonroot
# WORKDIR /home/nonroot

I have my genymotion.bin installer with chmod + x for Dockerfile ADD and run

To run, I use this command:

docker run -ti --rm --net=host
             -v $HOME/.Xauthority:/root/.Xauthority
            -e DISPLAY=unix$DISPLAY
            -v /tmp/.X11-unix:/tmp/.X11-unix
            --privileged
            --name=genymotion-test
             genymotion:teste  /bin/bash

Then I ran these commands that I found in jess / virtualbox docker.hub :

docker cp virtualbox:/etc/init.d/vboxdrv .
docker cp virtualbox:/usr/src/vboxhost-4.3.30 /usr/src/ 
docker cp virtualbox:/usr/share/virtualbox /usr/share
./vboxdrv setup 

I ran the docker run written above and ran it again.

GenyMotion runs and creates the machine, but this problem occurs:

InOracle'sVirtualMachine,IcreatethemachineandwhenIrunthiserroroccurs:

    
asked by anonymous 29.07.2015 / 05:46

1 answer

0

The command "RUN /etc/init.d/vboxdrv setup" requires run-time responses. You need to enable ways to respond in advance to this process.

    
04.10.2015 / 04:02