#315 fixed docker compose error and switched to PHP 7.2.0

This commit is contained in:
Dominik Liebler
2017-12-27 08:48:20 +01:00
parent 7cb5aa618b
commit 2141c4916c
3 changed files with 24 additions and 10 deletions

View File

@@ -1,12 +1,19 @@
#!/usr/bin/env bash
cd /opt/php
#!/bin/sh
echo "Installing composer..."
EXPECTED_SIGNATURE=$(wget -q -O - https://composer.github.io/installer.sig)
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('SHA384', 'composer-setup.php') === '669656bab3166a7aff8a7506b8cb2d1c292f042046c5a994c43155c0be6190fa0355160742ab2e1c88d40d5be660b410') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"
ACTUAL_SIGNATURE=$(php -r "echo hash_file('SHA384', 'composer-setup.php');")
if [ "$EXPECTED_SIGNATURE" != "$ACTUAL_SIGNATURE" ]
then
>&2 echo 'ERROR: Invalid installer signature'
rm composer-setup.php
exit 1
fi
php composer-setup.php --quiet
rm composer-setup.php
echo "Downloading dependencies using composer..."
php composer.phar install --prefer-dist --no-interaction