Closed calvera closed 3 years ago
Please provide sufficient information. Which image version are you using, do you have a custom image build on top? How are you starting the image?
i have my own composer in /usr/local/bin, 7.4-alpine
Why did you do that in the first place? Composer is/was always included in the basic images. The container now tries to symlink composer to either version 1 or 2 during boot.
See https://dockerfile.readthedocs.io/en/latest/content/DockerImages/dockerfiles/php.html#composer and https://github.com/webdevops/Dockerfile/issues/369
got error in case have COPY --from=composer:1.10.16 /usr/bin/composer /usr/local/bin/composer
in Dockerfile
otherwise if remove this line (there is no composer installation at all) getting
/bin/sh: 1: composer: not found
while running with docker-compose COMPOSER_VERSION is set to 1 in multiple places including Dockerfile but there is no composer while running with docker-compose build
worker$ docker-compose build --no-cache
rabbitmq uses an image, skipping
Building app
Step 1/4 : FROM webdevops/php-dev:7.4
---> 8c8243c43e82
Step 2/4 : ENV COMPOSER_VERSION=1
---> Running in 39fd6843503b
Removing intermediate container 39fd6843503b
---> 981df9879e5f
Step 3/4 : RUN echo env-composer-version ${COMPOSER_VERSION}
---> Running in a88f71f3c4a4
env-composer-version 1
Removing intermediate container a88f71f3c4a4
---> 930eb06ada44
Step 4/4 : RUN composer --version
---> Running in ebf62ca99927
/bin/sh: 1: composer: not found
ERROR: Service 'app' failed to build : The command '/bin/sh -c composer --version' returned a non-zero code: 127
Fixed with https://github.com/webdevops/Dockerfile/commit/40305a2a77c845356cca3ab005cf2ea5abffe927 (build pending, approx 1 hour)