This repository has been archived on 2021-04-06. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/home/.zshrc.docker

157 lines
3.7 KiB
Docker
Raw Normal View History

2018-03-28 01:24:21 +02:00
# Docker function definitions
function speedtest() {
2020-07-04 22:31:10 +02:00
docker run --init --rm tianon/speedtest --accept-license --accept-gdpr -p $@
2018-03-28 01:24:21 +02:00
}
2018-04-09 16:38:38 +02:00
function vobsub2srt() {
2020-07-04 22:31:10 +02:00
docker run \
--rm \
-v $PWD:/data \
-w /data \
2018-11-13 18:27:12 +01:00
-u $(id -u) \
2020-07-04 22:31:10 +02:00
sbruder/vobsub2srt \
--blacklist '„“”|/\`_~<>flfiff' \
$@
2018-04-09 16:38:38 +02:00
}
2018-04-09 17:53:46 +02:00
function aucdtect() {
2020-07-04 22:31:10 +02:00
docker run \
--rm \
-v "$PWD:/home/aucdtect/:ro" \
-e uid=$(id -u) \
-e gid=$(id -g) \
sbruder/aucdtect \
$@
2018-04-09 17:53:46 +02:00
}
function unrar () {
2020-07-04 22:31:10 +02:00
docker run \
2019-10-16 20:15:14 +02:00
-it \
--rm \
-v "$PWD:/data" \
-w /data \
-u $(id -u) \
r.sbruder.de/unrar \
$@
}
2019-08-06 06:32:47 +02:00
function waifu2x() {
docker run \
--rm \
--init \
-it \
2019-08-06 06:32:47 +02:00
-v "$PWD:/data" \
-w /data \
-v "$HOME/.waifu2x:/home/waifu2x/.waifu2x" \
-e HOME=/home/waifu2x \
-u $(id -u) \
--group-add $(getent group video|cut -d: -f3) \
--group-add $(getent group render|cut -d: -f3) \
--device /dev/dri \
r.sbruder.de/waifu2x-converter-cpp \
$@
}
2019-08-06 17:41:16 +02:00
function waifu2x-photo() {
waifu2x --model-dir /usr/local/share/waifu2x-converter-cpp-photo $@
}
2020-01-03 01:27:34 +01:00
function dive() {
docker run \
--rm \
-it \
-v /var/run/docker.sock:/var/run/docker.sock \
2020-03-14 12:31:14 +01:00
wagoodman/dive \
$@
2020-01-03 01:27:34 +01:00
}
function vapoursynth() {
2020-07-04 22:31:10 +02:00
docker run \
--rm \
-it \
-e WAYLAND_DISPLAY \
-e QT_QPA_PLATFORM \
-e XDG_RUNTIME_DIR \
-u $(id -u) \
-v ${XDG_RUNTIME_DIR}/${WAYLAND_DISPLAY}:${XDG_RUNTIME_DIR}/${WAYLAND_DISPLAY} \
-v "$HOME/.config/:/home/vapoursynth/.config/" \
-v "$PWD:/data/" \
-w /data/ \
--group-add $(getent group video|cut -d: -f3) \
--group-add $(getent group render|cut -d: -f3) \
--device /dev/dri \
2020-10-24 16:42:37 +02:00
--device /dev/kfd \
r.sbruder.de/vapoursynth \
$@
}
function yuuno() {
2020-07-04 22:31:10 +02:00
docker run \
--rm \
-it \
-u $(id -u) \
-v "$PWD:/data/" \
-w /data/ \
-p 8087:8087 \
--group-add $(getent group video|cut -d: -f3) \
--group-add $(getent group render|cut -d: -f3) \
--device /dev/dri \
2020-10-24 16:42:37 +02:00
--device /dev/kfd \
r.sbruder.de/vapoursynth \
jupyter notebook --ip 0.0.0.0 --port 8087
}
2020-04-24 23:08:56 +02:00
function aegisub() {
docker run \
--rm \
-it \
--device /dev/dri \
--group-add $(getent group video|cut -d: -f3) \
--group-add $(getent group video|cut -d: -f3) \
-e DISPLAY \
-e PULSE_COOKIE=/run/pulse/cookie \
-e PULSE_SERVER=/run/user/$(id -u)/pulse/native \
-u $(id -u) \
-v $HOME/.aegisub/:/home/aegisub/.aegisub/ \
-v $HOME/.config/pulse/cookie:/run/pulse/cookie \
-v $HOME/.fonts/:/home/aegisub/.fonts/ \
-v $PWD:/home/aegisub/data/ \
-v /run/user/$(id -u)/pulse/native:/run/user/$(id -u)/pulse/native \
-v /tmp/.X11-unix:/tmp/.X11-unix \
r.sbruder.de/aegisub \
$@
}
2020-05-22 13:27:53 +02:00
function ctop {
docker run \
--rm \
-it \
--name=ctop \
--volume /var/run/docker.sock:/var/run/docker.sock:ro \
quay.io/vektorlab/ctop
}
2020-07-18 09:27:07 +02:00
function gcloud {
docker run \
--rm \
-it \
-e TERM=xterm-256color \
-v $HOME/.config/gcloud/:/root/.config/gcloud/ \
-v $HOME/.config/gcloud-ssh/:/root/.ssh/ \
google/cloud-sdk \
gcloud "$@"
}
2020-08-04 00:26:43 +02:00
function netlify() {
docker run \
--rm \
-it \
--init \
-v $HOME/.netlify:/home/node/.netlify \
-v $PWD:/data/ \
-w /data/ \
r.sbruder.de/netlify-cli \
"$@"
}