File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -19,13 +19,21 @@ USAGE="Magento Cloud Docker
19
19
flush-redis clears redis cache
20
20
flush-varnish clears varnish cache
21
21
ece-db access to Database
22
+ php 7.1 run a command in a PHP 7.1 container
23
+ php 7.2 run a command in a PHP 7.2 container
24
+ php 7.3 run a command in a PHP 7.3 container
25
+ php 7.4 run a command in a PHP 7.4 container
22
26
23
27
\033[33mOptions:\033[0m
24
28
-h show this help text\n"
25
29
26
- if [ ${#@ } -ne 0 ] && [ " ${@# " -h" } " = " " ]; then
27
- printf " $USAGE "
28
- exit 0;
30
+ if [ ${#@ } -ne 0 ]; then
31
+ for arg in " $@ " ; do
32
+ if [ " ${arg# " -h" } " = " " ]; then
33
+ printf " $USAGE "
34
+ exit 0;
35
+ fi
36
+ done
29
37
fi ;
30
38
31
39
case " $1 " in
@@ -74,6 +82,11 @@ case "$1" in
74
82
ece-db)
75
83
docker-compose exec db sh -c ' mysql -u $MYSQL_USER -p$MYSQL_PASSWORD $MYSQL_DATABASE "$@"'
76
84
;;
85
+ php)
86
+ version=" $2 "
87
+ shift 2
88
+ docker run --rm -it -e " MAGENTO_ROOT=/app" -v " $( pwd) " :/app -v ~ /.composer/cache:/root/.composer/cache " magento/magento-cloud-docker-php:${version} -cli" " $@ "
89
+ ;;
77
90
* )
78
91
printf " $USAGE "
79
92
exit 0;
You can’t perform that action at this time.
0 commit comments