Dockerfile icon indicating copy to clipboard operation
Dockerfile copied to clipboard

/bin/sh: 1: composer: not found

Open GeoffreySB opened this issue 5 years ago • 4 comments

Hi,

I tried to rebuild my images and I get this error: /bin/sh: 1: composer: not found ERROR: Service 'xxxxxx' failed to build: The command '/bin/sh -c composer install' returned a non-zero code: 127

I use FROM webdevops/php-nginx:7.4

Can you please fix as I really urgently need to rebuild this image.

Thanks all.

GeoffreySB avatar Oct 27 '20 22:10 GeoffreySB

Discussion about this earlier today, use composer1 or composer2 as a workaround, but hope composer should work again soon...

wollanup avatar Oct 27 '20 23:10 wollanup

Thanks. composer1 did the trick.

GeoffreySB avatar Oct 28 '20 00:10 GeoffreySB

Fixed with https://github.com/webdevops/Dockerfile/commit/40305a2a77c845356cca3ab005cf2ea5abffe927

htuscher avatar Oct 28 '20 07:10 htuscher

This only switches the composer version in runtime. but I need to run composer in build time. So we need something like this

# Workaround 
ENV COMPOSER_VERSION=1
RUN unlink /usr/local/bin/composer && ln -s /usr/local/bin/composer${COMPOSER_VERSION:-2} /usr/local/bin/composer

beathorst avatar Nov 12 '20 09:11 beathorst