From d6dc460623304a8a4c54fb0a3525be62439dafe1 Mon Sep 17 00:00:00 2001 From: Carlos Gomes Date: Sun, 27 Aug 2023 18:55:13 +0200 Subject: [PATCH] Fix Composer install method --- .github/workflows/ci.yml | 2 +- Dockerfile | 14 +++++--------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 373143e..f539395 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: buildArgs: | PHP_VERSION=7.1 DEPLOYER_VERSION=v6.6.0 - COMPOSER_VERSION=2.2.18 + COMPOSER_VERSION=2.2.21 env: TAGGED_IMAGE: ${{ matrix.image }}:${{ matrix.tag }} TAGS: ${{ matrix.tag == matrix.latest && format('{0}:latest,', matrix.image) || '' }}${{ matrix.image }}:${{ matrix.tag }} diff --git a/Dockerfile b/Dockerfile index bd3868e..4bd1601 100644 --- a/Dockerfile +++ b/Dockerfile @@ -55,15 +55,11 @@ RUN \ # https://getcomposer.org/download/ -ARG COMPOSER_VERSION="2.4.1" -RUN \ - curl -L "https://getcomposer.org/installer" --output "composer-setup.php" \ - && php -r "if (hash_file('sha384', 'composer-setup.php') === '55ce33d7678c5a611085589f1f3ddf8b3c52d662cd01d4ba75c0ee0459970c2200a51f492d557530c71c15d8dba01eae') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" \ - && php composer-setup.php \ - --install-dir=/usr/local/bin \ - --filename=composer \ - --version=${COMPOSER_VERSION} \ - && rm "composer-setup.php" +# latest-stable will be replaced by a version number for PHP 7.1 +ARG COMPOSER_VERSION="latest-stable" +ADD --chmod=755 \ + https://getcomposer.org/download/${COMPOSER_VERSION}/composer.phar \ + /usr/local/bin/composer ARG DEPLOYER_VERSION="v6.8.0"