Update Readme
This commit is contained in:
parent
c79d9ca8c1
commit
b1e9a4b534
2
.gitignore
vendored
2
.gitignore
vendored
@ -6,3 +6,5 @@ custom/
|
||||
# temp files directories
|
||||
cache/
|
||||
log/
|
||||
|
||||
.idea
|
||||
|
37
README.md
37
README.md
@ -71,6 +71,43 @@ zshconfig
|
||||
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 :
|
||||
- improve aliases
|
||||
- more aliases ...
|
||||
|
Loading…
Reference in New Issue
Block a user