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

37 lines
688 B
Docker
Raw Normal View History

2018-03-28 01:24:21 +02:00
# Docker function definitions
function speedtest() {
docker run --rm tianon/speedtest
}
function docker-imagecheck() {
created=$(date -d $(docker inspect "$1" | jshon -e 0 -e Created -u) "+%s")
now=$(date "+%s")
if [ "$((created + (5*24*60*60)))" -lt "$now" ];then
echo "$1 is older than 5 days, pulling…"
docker pull $1
else
echo "$1 is up to date, skipping…"
fi
}
2018-04-09 16:38:38 +02:00
function vobsub2srt() {
docker run \
--rm \
2018-11-13 18:27:12 +01:00
-v $PWD:/data \
-u $(id -u) \
2018-04-09 16:38:38 +02:00
sbruder/vobsub2srt \
--blacklist '„“”|/\`_~<>' \
$@
}
2018-04-09 17:53:46 +02:00
function aucdtect() {
docker run \
--rm \
2018-04-09 17:53:46 +02:00
-v "$PWD:/home/aucdtect/:ro" \
-e uid=$(id -u) \
-e gid=$(id -g) \
sbruder/aucdtect \
2018-04-09 17:53:46 +02:00
$@
}