ERROR: failed to solve: rpc error: code = Unknown desc = executor failed running (composer install)

Viewed 445

I'm trying to work with docker and below is the code of the Dockerfile. But after run docker-compose up in terminal and the error showed failed to solve **:** rpc error: code = Unknown desc = executor failed running [/bin/sh -c composer install]: exit code: 2. How can I solve this error ?

FROM php:7.3

RUN apt-get update -y && apt-get install -y openssl zip unzip git
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
RUN docker-php-ext-install pdo mbstring pdo_mysql

WORKDIR /app
COPY . .
RUN composer install

CMD php artisan serve --host=0.0.0.0
EXPOSE 8000
0 Answers
Related