nano php
- paste and save php string
nano composer
- paste and save composer string
chmod a+x ./php
chomd a+x ./composer
sudo mv ./php /usr/bin/php
(/usr/local/bin/php
?)sudo mv ./composer /usr/bin/composer
(/usr/local/bin/composer
?)
OR! You can create just simple alias for your shell instead fake binary creation
Fish shell example:
cat ~/.config/fish/functions/composer.fish
alias composer="docker run -it --rm --interactive --tty -v $(pwd):/app --user $(id -u):$(id -g) -v ~/.ssh:/home/user/.ssh -w /app composer composer"
BE AWARE! composer docker image uses the latest php version. So, if u want to use older php you must create personal image with preferred php version (e.g 7.4). Or... just ignore platform reqs (e.g composer install --ignore-platform-reqs
)