Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save cloudmustafa/f6b07d4cc926424439da4784d397f519 to your computer and use it in GitHub Desktop.
Save cloudmustafa/f6b07d4cc926424439da4784d397f519 to your computer and use it in GitHub Desktop.
Macbook aliases for Docker, Github, and Kubernetes
#Docker aliases
alias di='docker images'
alias dcu='docker-compose up -d'
alias dcd='docker-compose down'
alias dcb='docker-compose build'
alias dps='docker ps'
alias db='docker build -t'
alias dr='docker run -p '
alias de='docker exec -it '
alias drm='docker rm `docker ps --no-trunc -aq`'
alias drmi='docker rmi $(docker images --filter "dangling=true" -q --no-trunc)'
alias dsp='docker system prune -a'
# Auto complete
export PATH=/usr/local/etc/:$PATH
if [ -f $(brew --prefix)/$PATH/bash_completion ]; then
. $(brew --prefix)$PATH/bash_completion
fi
# MacOS aliases
alias cls='clear'
#kubernetes aliases
alias ka='kubectl apply -f'
alias kgn='kubectl get nodes'
alias kgnn='kubectl get nodes --namespace'
alias kgs='kubectl get services'
alias kgp='kubectl get pods -o wide --all-namespaces'
alias kgpn='kubectl get pods -o wide --namespace'
alias kdp='kubectl describe pod'
alias kds='kubectl describe services --all-namespaces'
alias kd='kubectl delete -f'
alias kc='kubectl create -f'
alias kl='kubectl logs'
alias ked='kubectl expose deployment'
# Git aliases
alias gc='git clone '
alias gi='git init '
alias ga='git add . '
alias gcm='git commit -m '
alias gra='git remote add origin '
alias gp='git push -u origin master '
# Terraform aliases
alias ti='terraform init'
alias tp='terraform plan'
alias ta='terraform apply'
alias td='terraform destroy'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment