forked from matthewhartstonge/docker-genymotion
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.sh
32 lines (26 loc) · 853 Bytes
/
setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env bash
# This enables root to run X server - the linux window system
xhost local:root
# Generate folder for persistent data
mkdir -p `pwd`/persistent_data/genymotion/.Genymobile
chown -R root:root `pwd`/persistent_data/*
# run the container to fail
docker run -d \
--privileged \
--net=host \
-e DISPLAY=unix$DISPLAY \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v `pwd`/persistent_data/genymotion:/root/ \
--name dkms \
matthewhartstonge/genymotion
# Copy the vbox driver and libs from the named dkms container
docker cp dkms:/usr/lib/virtualbox/vboxdrv.sh .
docker cp dkms:/usr/share/virtualbox /usr/share
# Install the DKMS modules on the host
./vboxdrv.sh setup
# Remove libs and build script
rm vboxdrv.sh
rm -rf /usr/share/virtualbox
# Kill off and cleanup unneeded container
docker kill dkms
docker rm dkms