Zend certified PHP/Magento developer

use n98-magerun2 command to audit a special version

I was installed magento 2.2.5 by docker-compose and i want to execute some command using m98-magerun2 , i tried some method but without any result such as :-

wget https://files.magerun.net/n98-magerun2.phar
chmod +x ./n98-magerun2.phar
sudo cp ./n98-magerun2.phar /usr/local/bin/

Then when i tried to execute

n98-magerun2 --skip-root-check cache:c

i meet this error

bash: n98-magerun2: command not found

but when use this command

n98-magerun2.phar --skip-root-check cache:c

i meet this error
ErrorException: PHP Version is lower than 7.2.0. Please upgrade your runtime.

by the way when i upgrade php version it’s interrupt the magento website and i meet other error .
So my question now how to execute the n98-magerun2 command in doecker-compose ?

this is a command i want to execute :-

n98-magerun2 --skip-root-check cache:c
n98-magerun2 mpmd:corehacks --skip-root-check --root-dir 
n98-magerun2 mpmd:codepooloverrides --skip-root-check --root-dir 
n98-magerun2 dev:module:list --skip-root-check --root-dir 
n98-magerun2 --skip-root-check dev:module:rewrite:list 
n98-magerun2 --skip-root-check dev:module:rewrite:conflicts 
n98-magerun2 sys:info --skip-root-check --root-dir 
n98-magerun2 dev:report:count --skip-root-check --root-dir 

all This command was executed by docker-compose using

docker exec -it -uroot web bash