Add docker module
This commit is contained in:
parent
f2a826e963
commit
e1adba9986
3 changed files with 40 additions and 0 deletions
|
@ -31,6 +31,11 @@ DNF
|
|||
|
||||
Defines dnf aliases.
|
||||
|
||||
Docker
|
||||
---
|
||||
|
||||
Sets the environment variables to work with docker through boot2docker
|
||||
|
||||
Dpkg
|
||||
----
|
||||
|
||||
|
|
15
modules/docker/README.md
Normal file
15
modules/docker/README.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
Docker
|
||||
======
|
||||
|
||||
Sets the environment variables to work with [docker][1] through [boot2docker][2]
|
||||
|
||||
Authors
|
||||
-------
|
||||
|
||||
*The authors of this module should be contacted via the [issue tracker][3].*
|
||||
|
||||
- [Pavel Chernykh](https://github.com/pavel-v-chernykh)
|
||||
|
||||
[1]: http://docker.io/
|
||||
[2]: http://boot2docker.io/
|
||||
[3]: https://github.com/sorin-ionescu/prezto/issues
|
20
modules/docker/init.zsh
Normal file
20
modules/docker/init.zsh
Normal file
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Sets the environment variables to work with docker through boot2docker
|
||||
#
|
||||
# Authors:
|
||||
# Pavel Chernykh <pavel.v.chernykh@gmail.com>
|
||||
#
|
||||
|
||||
#
|
||||
# Return if requirements are not found.
|
||||
#
|
||||
if (( !( $+commands[docker] && $+commands[boot2docker]) )); then
|
||||
return 1
|
||||
fi
|
||||
|
||||
#
|
||||
# Set the environment variables if boot2docker is running
|
||||
#
|
||||
if [[ `boot2docker status` == "running" ]]; then
|
||||
eval `boot2docker shellinit 2> /dev/null`
|
||||
fi
|
Loading…
Add table
Reference in a new issue