Update Readme

This commit is contained in:
Philippe-Adrien Nousse 2018-05-19 16:20:49 +02:00
parent c79d9ca8c1
commit b1e9a4b534
2 changed files with 39 additions and 0 deletions

2
.gitignore vendored
View File

@ -6,3 +6,5 @@ custom/
# temp files directories # temp files directories
cache/ cache/
log/ log/
.idea

View File

@ -71,6 +71,43 @@ zshconfig
zshrefresh zshrefresh
``` ```
### Docker:
######
```
alias dc="docker-compose"
alias dm="docker-machine"
alias dmq="eval $(docker-machine env -u)"
# Example: dme node1
dme() {
eval $(docker-machine env $1)
}
alias d="docker"
alias cleanContainers="docker container rm \$(docker container ls -a -q) "
alias cleanVolumes="docker volume rm \$(docker volume ls -q) "
swarmCleanVolumes(){
nodes=($(docker-machine ls -q))
for node in "${nodes[@]}"
do
volumes=($(docker-machine ssh ${node} "docker volume ls -q"))
docker-machine ssh ${node} "docker volume rm ${volumes[@]}"
done
}
swarmCleanContainers() {
nodes=($(docker-machine ls -q))
for node in "${nodes[@]}"
do
containers=($(docker-machine ssh ${node} "docker container ls -aq"))
docker-machine ssh ${node} "docker container rm ${containers[@]}"
done
}
```
### TODO : ### TODO :
- improve aliases - improve aliases
- more aliases ... - more aliases ...