Created
November 14, 2017 02:24
-
-
Save grantseltzer/a57cf4247beb1397b321ba01556661db to your computer and use it in GitHub Desktop.
Container functions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function chrome() { | |
docker run \ | |
--rm \ | |
--security-opt seccomp=$HOME/.seccomp/chrome.json \ | |
--net=host \ | |
--memory 512mb \ | |
--cpuset-cpus 0 \ | |
-e DISPLAY=unix$DISPLAY \ | |
-v $HOME/Downloads:$HOME/Downloads \ | |
-v /tmp/.X11-unix:/tmp/.X11-unix \ | |
--group-add video \ | |
--group-add audio \ | |
--device /dev/dri \ | |
--device /dev/snd \ | |
--ipc='host' \ | |
--name chrome \ | |
-v $HOME/.chrome:/data \ | |
grantseltzer/chrome:v0 \ | |
/usr/bin/google-chrome --user-data-dir=/data | |
} | |
function code() { | |
docker run \ | |
--rm \ | |
-it \ | |
-e DISPLAY=unix$DISPLAY \ | |
-e GOPATH=/home/go \ | |
-v $HOME/go:$HOME/go \ | |
-v /tmp/.X11-unix:/tmp/.X11-unix \ | |
-v $HOME/.ssh:$HOME/.ssh \ | |
--group-add video \ | |
--group-add audio \ | |
--device /dev/dri \ | |
--device /dev/snd \ | |
--name code \ | |
grantseltzer/vscode:v0 \ | |
zsh | |
} | |
function slack() { | |
docker run \ | |
--rm \ | |
--net=host \ | |
-e DISPLAY=unix$DISPLAY \ | |
-v $HOME/Downloads:$HOME/Downloads \ | |
-v /tmp/.X11-unix:/tmp/.X11-unix \ | |
--group-add video \ | |
--group-add audio \ | |
--device /dev/dri \ | |
--device /dev/snd \ | |
--ipc='host' \ | |
--name slack \ | |
grantseltzer/slack:v0 \ | |
/usr/bin/slack | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment