Skip to content

Commit 2e17591

Browse files
author
Ric Harvey
authored
Merge pull request #125 from aschonbe/master
[FIX] Composer.phar Installer auto-version SHA
2 parents 93492db + ce70c0f commit 2e17591

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ MAINTAINER ngineered <support@ngineered.co.uk>
55
ENV php_conf /usr/local/etc/php-fpm.conf
66
ENV fpm_conf /usr/local/etc/php-fpm.d/www.conf
77
ENV php_vars /usr/local/etc/php/conf.d/docker-vars.ini
8-
ENV composer_hash 55d6ead61b29c7bdee5cccfb50076874187bd9f21f65d8991d46ec5cc90518f447387fb9f76ebae1fbbacf329e583e30
98

109
ENV NGINX_VERSION 1.11.10
1110

@@ -172,8 +171,9 @@ RUN echo @testing http://nl.alpinelinux.org/alpine/edge/testing >> /etc/apk/repo
172171
mkdir -p /var/www/app && \
173172
mkdir -p /run/nginx && \
174173
mkdir -p /var/log/supervisor && \
174+
EXPECTED_COMPOSER_SIGNATURE=$(wget -q -O - https://composer.github.io/installer.sig) && \
175175
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \
176-
php -r "if (hash_file('SHA384', 'composer-setup.php') === '${composer_hash}') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" && \
176+
php -r "if (hash_file('SHA384', 'composer-setup.php') === '${EXPECTED_COMPOSER_SIGNATURE}') { echo 'Composer.phar Installer verified'; } else { echo 'Composer.phar Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" && \
177177
php composer-setup.php --install-dir=/usr/bin --filename=composer && \
178178
php -r "unlink('composer-setup.php');" && \
179179
pip install -U pip && \

0 commit comments

Comments
 (0)