Created
May 3, 2017 06:39
-
-
Save jonwhittlestone/d78103321923efdb05d4b13ec3fb7e30 to your computer and use it in GitHub Desktop.
Docker Build error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
▶ docker build -t shakyshane/laravel-app -f ./app.dockerfile . | |
Sending build context to Docker daemon 721.4 kB | |
Step 1/8 : FROM shakyshane/laravel-php:latest | |
---> dd18f9511e64 | |
Step 2/8 : COPY composer.lock composer.json /var/www/ | |
---> Using cache | |
---> 874dac8074d3 | |
Step 3/8 : COPY database /var/www/database | |
---> Using cache | |
---> dd57d56da83e | |
Step 4/8 : WORKDIR /var/www | |
---> Using cache | |
---> 15812e2d5b07 | |
Step 5/8 : RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && php -r "if (hash_file('SHA384', 'composer-setup.php') === '55d6ead61b29c7bdee5cccfb50076874187bd9f21f65d8991d46ec5cc90518f447387fb9f76ebae1fbbacf329e583e30') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" && php composer-setup.php && php -r "unlink('composer-setup.php');" && php composer.phar install --no-dev --no-scripts && rm composer.phar | |
---> Running in a96a7fc93e9b | |
Installer corrupt | |
Could not open input file: composer-setup.php | |
The command '/bin/sh -c php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && php -r "if (hash_file('SHA384', 'composer-setup.php') === '55d6ead61b29c7bdee5cccfb50076874187bd9f21f65d8991d46ec5cc90518f447387fb9f76ebae1fbbacf329e583e30') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" && php composer-setup.php && php -r "unlink('composer-setup.php');" && php composer.phar install --no-dev --no-scripts && rm composer.phar' returned a non-zero code: 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Jon,
the hash for the composer installer is out of date - if you check against https://getcomposer.org/download/ you will see the correct hash code. If you put that into your app.dockerfile then it will work :) It's just because composer has been updated since Shane wrote his blog post.
James