Closed salvamomo closed 5 years ago
How about following https://getcomposer.org/doc/faqs/how-to-install-composer-programmatically.md so we always get the latest versions on builds?
I like @deviantintegral's suggestion!
If it's helpful, here's some Makefile syntax for that:
https://github.com/Lullabot/tugboat-registry/blob/master/baseimage/share/Makefile#L49-L67
composer_expected_signature = $(shell wget -q -O - https://composer.github.io/installer.sig)
# Installs the latest version of Composer. Note, you should use install-php-%
# first to ensure your desired version of PHP is installed.
.PHONY: install-composer
install-composer: install-package-wget ## Installs the latest version of Composer.
$(info Installing Composer...)
# # The following code is adapted from https://getcomposer.org/doc/faqs/how-to-install-composer-programmatically.md
wget -O composer-setup.php https://getcomposer.org/installer
@if ! sha384sum composer-setup.php | grep ${composer_expected_signature}; then \
>&2 echo 'ERROR: Invalid installer signature'; \
rm composer-setup.php; \
exit 1; \
fi
php composer-setup.php --install-dir=/tmp
mv -f /tmp/composer.phar /usr/local/bin/composer
rm composer-setup.php
# # Install hirak/prestissimo to speed up composer operations.
composer --no-ansi global require hirak/prestissimo
@echo "Composer installed."```
Whoops, nevermind, I forgot this project doesn't use Make! 😊
Thanks anyway @q0rban!
@juampynr @deviantintegral All right, I think this should do it now. CircleCI passes and I was able to build the Dockerfile locally without errors, so I believe that's all needed (first time I build a Dockerfile).
The composer version used by the docker image is a bit old. (
Composer 1.7.1
).This PR pulls the 1.8.4 version.