-
-
Save andrasguseo/4c148e4ea62d8a1b7400157c999d7656 to your computer and use it in GitHub Desktop.
Composer for DevKinsta
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## On you machine run: | |
docker exec -it devkinsta_fpm bash | |
## After you are logged change to /tmp | |
cd /tmp | |
## Install and configure composer | |
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" | |
php -r "if (hash_file('sha384', 'composer-setup.php') === '756890a4488ce9024fc62c56153228907f1545c228516cbf63f885e036d37e9a59d27d63f46af1d4d07ee0f76181c7d3') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" | |
php composer-setup.php | |
php -r "unlink('composer-setup.php');" | |
## Move composer to location where linux can access it easily | |
mv /tmp/composer.phar /usr/local/bin/composer | |
## Make composer executable | |
chmod +x /usr/local/bin/composer | |
## Confirm installation | |
composer --version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For line 9, when checking the hash, make sure to use the hash for the current version. You can find that - actually lines 8-11 - here:
https://getcomposer.org/download/