pe3zx / mthc

All-in-one bundle of MISP, TheHive and Cortex
MIT License
169 stars 37 forks source link

ERROR: Service 'misp-web' failed to build #5

Closed joker2013 closed 4 years ago

joker2013 commented 4 years ago

Step 52/144 : RUN php composer-setup.php ---> Running in dc96c2a77f56 Could not open input file: composer-setup.php ERROR: Service 'misp-web' failed to build: The command '/bin/sh -c php composer-setup.php' returned a non-zero code: 1

joker2013 commented 4 years ago

It is an issue with the composer-setup.php file change and the resulting SHA384 hash. Check https://getcomposer.org/download/ for the new hash.

https://github.com/MISP/misp-docker/issues/64

joker2013 commented 4 years ago

https://github.com/MISP/MISP/pull/5473

joker2013 commented 4 years ago

FIX COMPOSER

RUN curl --fail --location -o composer-setup.php https://getcomposer.org/installer && \ EXPECTED_SIGNATURE="$(curl https://composer.github.io/installer.sig)"; php -r "if (hash_file('sha384', 'composer-setup.php') == '$(echo $EXPECTED_SIGNATURE)' ) { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" && \ php composer-setup.php && \ php -r "unlink('composer-setup.php');"

END FIX

joker2013 commented 4 years ago

misp-docker/web/Dockerfile

leips commented 4 years ago

Edit the misp dockerfile and add the last hash of Composer

`

FIX COMPOSER

RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" RUN php -r "if (hash_file('sha384', 'composer-setup.php') === 'e0012edf3e80b6978849f5eff0d4b4e4c79ff1609dd1e613307e16318854d24ae64f26d17af3ef0bf7cfb710ca74755a') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" RUN php composer-setup.php RUN php -r "unlink('composer-setup.php');"

END FIX`

pe3zx commented 4 years ago

Hi, I've just updated the submodules. Could you try it again?

pe3zx commented 4 years ago

Closing due to no further response.