-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.container-aliases
65 lines (49 loc) · 2.84 KB
/
.container-aliases
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/bin/bash
# shellcheck disable=SC1004
_hasCmd "docker" || _hasCmd "podman" || return 0
_hasCmd "podman" && alias docker='podman'
dockerrun() { eval docker run --rm --interactive --tty "$*"; }
dockerrunu() { eval dockerrun --user="$(id -u):$(id -g)" "$*"; }
dockerrunuw() { eval dockerrunu --volume "$(pwd)":"$(pwd)" --workdir "$(pwd)" "$*"; }
docker-logs() {
docker logs -f "$(docker ps | fzf | awk '{print $1}')"
}
alias dc='docker compose'
alias dcd='docker compose down --remove-orphans'
alias podman-nuke='podman rm -f'
alias podman-machine-restart='podman machine stop; sleep 3; podman machine start'
alias babellint='dockerrunuw ghcr.io/heussd/babellint:main'
alias pdflatex='dockerrunu mingc/latex pdflatex'
alias xelatex='dockerrunu mingc/latex xelatex'
# Cloud
#alias az='dockerrun -v ${HOME}/.azure/:/root/.azure -v ${HOME}/.kube/:/root/.kube/ -v ${HOME}/.ssh:/root/.ssh mcr.microsoft.com/azure-cli az'
#alias aws='docker run --rm -it --volume "$(pwd)":"$(pwd)" --workdir "$(pwd)" -v ~/.aws:/root/.aws amazon/aws-cli'
#alias kubectl='dockerrunu -v ${HOME}/.kube/:/.kube bitnami/kubectl:latest'
#alias gcloud='docker run --rm -ti --volumes-from gcloud-config google/cloud-sdk gcloud'
# Office
alias reveal-md='docker run --rm -p 1948:1948 -v $(pwd)/:/slides webpronl/reveal-md:latest'
#alias pandoc='dockerrunuw pandoc/latex:latest' # Use native command as pipes work differently
#alias latex='dockerrunu --net=none -v "$PWD":/data "blang/latex:ubuntu"'
#alias latexmk='latex latexmk'
#alias graphviz="graphviz/graphviz:ubuntu-20.04"
# Development tools
alias protoc='dockerrunu -v $(pwd):$(pwd) -w $(pwd) znly/protoc'
#alias mvn='dockerrunuw --volume "$HOME/.m2":/root/.m2 maven:3-jdk-11 mvn'
#alias gradle='dockerrunuw gradle gradle'
#alias ruby='dockerrunuw ruby:latest ruby'
# Taken from https://github.com/JanGalek/dockerized/tree/master/applications/node
#alias node='docker run --rm --interactive --tty --volume $PWD:/app -w /app --user $(id -u):$(id -g) node node '
#alias npm='docker run --rm --interactive --tty --volume $PWD:/usr/src/app -w /usr/src/app --user $(id -u):$(id -g) node npm --loglevel=warn '
#alias npx='docker run --rm --interactive --tty --volume $PWD:/app -w /app --user $(id -u):$(id -g) node npx --loglevel=warn '
#alias node10='dockerrunu --volume "$(pwd):/app" -w /app node:10'
#alias npm10='node10 npm --loglevel=warn '
#alias npx10='node10 npx --loglevel=warn '
alias ffmpeg='dockerrunuw docker.io/jrottenberg/ffmpeg:latest'
alias gdal='dockerrunuw ghcr.io/osgeo/gdal:ubuntu-small-3.6.4'
alias opsifyc='docker run --pull always --interactive --tty --platform linux/amd64 --rm \
-v "$HOME/.opsify/:/root/.opsify/" \
-v "$(PWD)/:/app/workdir/" \
-v "$HOME/.gitconfig:/root/.gitconfig" \
-v "$HOME/.ssh:/root/.ssh" \
registry.gitlab.com/pwc-de/team-advisory-digital-incubator/devops/opsify:latest'
alias magick='dockerrunuw minidocks/imagemagick'