Skip to content

Instantly share code, notes, and snippets.

@hiviah
Created December 8, 2015 16:07
Show Gist options
  • Select an option

  • Save hiviah/32b06a56c810758a1bf3 to your computer and use it in GitHub Desktop.

Select an option

Save hiviah/32b06a56c810758a1bf3 to your computer and use it in GitHub Desktop.
Bash script to run Chrome in docker (X and pulseaudio through unix sockets)
#!/bin/bash
docker run -ti --rm \
-u developer \
-e DISPLAY=$DISPLAY \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-e PULSE_SERVER=unix:/home/developer/pulse \
-v /home/user/.pulse/0123456789abcdef0123456789abcdef-runtime/native:/home/developer/pulse \
-w /home/developer \
-v /dev/bus/usb:/dev/bus/usb \
-v /sys/bus/usb/:/sys/bus/usb/ \
-v /sys/devices/:/sys/devices/ \
-v /dev/hidraw4:/dev/hidraw4 \
--privileged \
chrome-browser \
google-chrome
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment