Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Commit

Permalink
moved composer hash to ARG
Browse files Browse the repository at this point in the history
  • Loading branch information
Sven Speckmaier committed Sep 20, 2017
1 parent a5aad75 commit cf7e97d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
FROM php:7.2-rc-alpine

ARG COMPOSER_HASH=544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061
ARG DOCKER_COMPOSE_VERSION=1.15.0
ARG RANCHER_COMPOSE_VERSION=0.12.5
ARG RANCHERIZE_HOME=/home/rancherize
Expand Down Expand Up @@ -40,7 +41,7 @@ WORKDIR /opt/rancherize

# install composer packages
RUN 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 -r "if (hash_file('SHA384', 'composer-setup.php') === '$COMPOSER_HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" \
&& php composer-setup.php \
&& php -r "unlink('composer-setup.php');" \
&& ./composer.phar install --no-dev && rm composer.phar
Expand Down

0 comments on commit cf7e97d

Please sign in to comment.