File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,12 @@ do_down() {
71
71
do_docker_compose down
72
72
}
73
73
74
+ # Clean all containers, images and volumes
75
+ do_clean () {
76
+ section_title " Cleanup containers and images"
77
+ do_docker_compose down --rmi all --volumes --remove-orphans
78
+ }
79
+
74
80
do_composer_update () {
75
81
echo ' composer update'
76
82
if [[ -z " ${LOWEST} " ]]; then
@@ -325,6 +331,7 @@ do_notice() {
325
331
printf " \n ${GREEN} ./dev.sh test_all --filter AnonymizatorFactoryTest${NC} "
326
332
printf " \n - ${GREEN} test${NC} : Run PHPUnit tests for a specific database vendors or version"
327
333
printf " \n - ${GREEN} unittest${NC} : Run PHPUnit tests without any database vendor"
334
+ printf " \n - ${GREEN} clean${NC} : Cleanup containers and images"
328
335
printf " \n - ${GREEN} notice${NC} : Display this help"
329
336
printf " \n"
330
337
printf " \nAvailable options:"
@@ -341,6 +348,6 @@ action=${1-}
341
348
if [[ -n $@ ]]; then shift ; fi
342
349
343
350
case $action in
344
- build|up|down|ps|checks|test_all|unittest|test|composer_update|notice) do_$action " $@ " ;;
351
+ build|up|down|ps|checks|test_all|unittest|test|composer_update|notice|clean ) do_$action " $@ " ;;
345
352
* ) do_notice;;
346
353
esac
Original file line number Diff line number Diff line change @@ -47,6 +47,12 @@ When you finish to develop, stop the stack with:
47
47
./dev.sh down
48
48
```
49
49
50
+ If you need to clean up everything (containers, images and volumes), you can use:
51
+
52
+ ``` sh
53
+ ./dev.sh clean
54
+ ```
55
+
50
56
To learn more about ` dev.sh ` script, launch:
51
57
52
58
``` sh
You can’t perform that action at this time.
0 commit comments