Last active
August 18, 2016 10:35
-
-
Save zburgermeiszter/bc6c090c4e1760bce1e5 to your computer and use it in GitHub Desktop.
Useful Docker bash aliases
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!~/.bashrc | |
| # Get shell to a container by it's name. | |
| function dsh() { docker exec -it $(docker ps | grep $1 | cut -d" " -f1) /bin/bash;} | |
| function php() { docker run --rm -v $PWD:/php php:5.5 php /php/$1; } | |
| function vssh { | |
| vagrant ssh -c "sudo /bin/bash -c $1" | |
| } | |
| alias dc='docker-compose' | |
| alias composer='docker run --rm -it -u 1000:1000 -v $(pwd):/app -v ~/.ssh:/home/user/.ssh zburgermeiszter/composer' | |
| alias dgc='docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v /etc:/etc spotify/docker-gc' | |
| alias pma='ssh -N -f -C -p 2222 -L $ETH0_IP:3306:localhost:3306 vagrant@127.0.0.1 && docker run -d -e PMA_ARBITRARY=1 -p 8080:80 phpmyadmin/phpmyadmin' | |
| alias traceroute='docker run -t --rm zburgermeiszter/traceroute' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment