docker
To launch, close and execute container with docker-compose and its relative services without change the directory.
git
Fuzzy the current location to pull all the submodules and specify the project if required.
# | date | version |
---|---|---|
1 | 2020/01/24 | v0.1.2 |
2 | 2020/01/27 | v0.1.4 |
3 | 2020/02/02 | v0.1.5 |
4 | 2020/02/13 | v0.1.6 |
5 | 2020/03/22 | v0.1.8 |
- Fixed dockit -u & -d cannot work properly when the project not located at $HOME directory.
- Replaced whole color module.
- Fixed display bug while remote added new branches.
- Removed optional argument
-n
, use positional argument instead.(default:basename of $pwd)
- Support pull a project and the all the submodules which belongs to the project without change the directory.
- Support change source directory by setting a environment variable
export DOCKIT_ROOT='~/your/custom/path'
.
- Removed -l flag of _exec_container to solve some container cannot call go properly
- Install
pip install dockit
- Setup source root(Optional)
Make it temporary or add the following line to your
.bashrc
,.zshrc
or profile to keep it permanently.
export DOCKIT_ROOT='~/TO/YOUR/CUSTOM/PATH'
dockit.py [-h] [-a] [-p] [-l] [-c] [-u] [-d] [-e] [-s] [project]
show this help message and exit
pull git repository and all sub repositories
parse project prefix and launch ${PREFIX}_service
docker-compose up -d container with the same name as project
to keep attaching mode after docker-compose upped
docker-compose down container with the same name as project
parse project prefix and close ${PREFIX}_service
docker exec -it container bash
show docker processes
# .bashrc or .zshrc
alias gitpull="dockit -p"
alias run="dockit -e"
alias up="dockit -u"
alias uu="dockit -l"
alias uuu="dockit -lu"
alias uur="dockit -lue"
alias uura="dockit -luea"
alias down="dockit -d"
alias dd="dockit -c"
alias ddd="dockit -cd"
alias dps="dockit -s"
If you like my work, please consider buying me a coffee or PayPal
Thanks for your support! Cheers! 🎉