Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save indiejoseph/eb793fc39847249fd07a88c7046095ee to your computer and use it in GitHub Desktop.
Save indiejoseph/eb793fc39847249fd07a88c7046095ee to your computer and use it in GitHub Desktop.
Container OS .aliases
#!/usr/bin/env bash
function git {
docker run -it --rm \
-v ~/.ssh:/root/.ssh \
-v /`pwd`:/root/work \
-w /root/work \
bryandollery/alpine-git git \
-c "user.email=$(grep email ~/.gitconfig | cut -d '=' -f2 | xargs)" \
-c "user.name=$(grep name ~/.gitconfig | cut -d '=' -f2 | xargs)" \
-c "push.default=$(grep default ~/.gitconfig | cut -d '=' -f2 | xargs)" \
"$@"
}
alias docker-compose='docker run --rm \
-v /var/run/docker.sock:/var/run/docker.sock \
-v "$PWD:$PWD" \
-w="$PWD" \
docker/compose:1.29.2'
alias wget='docker run --rm mwendler/wget'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment