3 ms·
I just use bash aliases in my .profile ---- alias dm="docker-machine" alias dc="docker-compose" alias denv='function __denv() { eval "$(dm env $@)"; unset -
by tniswong 11y ago
I just use bash aliases in my .profile
----
alias dm="docker-machine"
alias dc="docker-compose"
alias denv='function __denv() { eval "$(dm env $@)"; unset -f __denv; }; __denv'
----
dm create --driver virtualbox local
denv local
Also works with swarm params:
denv local --swarm swarm-master
- mentat 11y agoThanks for this, I'd been typing way too much for too long. However, dc overlaps with the dc program so I've moved to dkm and dkc (since I actually use dc from time to time.)
- bm1362 11y agoMine are similar: dssh() { docker exec -ti $1 /bin/bash } dexec() { img="$1" shift docker exec $img /bin/sh -c "$@" }
- jzelinskie 11y agoThe whole Quay team at CoreOS uses OSX to develop a container registry. As a result I have a bunch of useful aliases as well[0]. A lot of them have to do with just plain cleaning up after yourself, but I also wrap my calls to `docker` with a zsh function that will eval my dev docker-machine environment if it hasn't been already. [0]: https://github.com/jzelinskie/dotfiles/blob/b2d33f8c601d1b7d9cce1df3319561e182251a26/zshrc#L12-L30 https://github.com/jzelinskie/dotfiles/blob/b2d33f8c601d1b7d...