-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·35 lines (30 loc) · 887 Bytes
/
run.sh
File metadata and controls
executable file
·35 lines (30 loc) · 887 Bytes
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
33
34
35
#!/bin/bash
USER_NAME=arnaudhb
USER_ID=`id -u`
IMG_NAME=$(basename $(pwd))
IMG_TAG=java
xhost + si:localuser:root
docker run -it --rm \
-e DISPLAY=$DISPLAY \
-e PULSE_SERVER=/run/pulse/native \
-e PULSE_COOKIE=/run/pulse/cookie \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v /var/run/user/$USER_ID/pulse:/run/pulse \
-v /var/run/dbus:/var/run/dbus \
-v ~/.config/pulse/cookie:/run/pulse/cookie \
-v /etc/machine-id:/etc/machine-id \
-v /var/lib/dbus:/var/lib/dbus \
-v /dev/shm:/dev/shm \
-v /dev/dri:/dev/dri \
--security-opt seccomp:$PWD/chrome.json \
--group-add audio \
--group-add video \
$DOCKER_VOLUMES \
$USER_NAME/$IMG_NAME:$IMG_TAG $*
xhost - si:localuser:root
# Sharing audio between host and container
# did some mess on the host.
# Kill pulseaudio process and let
# start-stop-daemon restart it with unprivileged
# user to get back audio
killall pulseaudio