Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RUN "composer install" Does break docker build. #23

Open
dedfft opened this issue May 10, 2024 · 3 comments
Open

RUN "composer install" Does break docker build. #23

dedfft opened this issue May 10, 2024 · 3 comments

Comments

@dedfft
Copy link

dedfft commented May 10, 2024

Thank you for your reply. I tried this multiple times. I get this error every time.
Strictly followed instructions

=> ERROR [5/6] RUN composer install --no-interaction --no-scripts --no-suggest                                                         0.5s
------
> [5/6] RUN composer install --no-interaction --no-scripts --no-suggest:
0.498 Composer plugins have been disabled for safety in this non-interactive session.
0.498 Set COMPOSER_ALLOW_SUPERUSER=1 if you want to allow plugins to run as root/super user.
0.498 Do not run Composer as root/super user! See https://getcomposer.org/root for details
0.509 You are using the deprecated option "--no-suggest". It has no effect and will break in Composer 3.
0.509 Composer could not find a composer.json file in /
0.509 To initialize a project, please create a composer.json file. See https://getcomposer.org/basic-usage
------
Dockerfile:6
--------------------
   4 |     COPY ./dockerizer/vhost.conf /opt/docker/etc/nginx/vhost.conf
   5 |     COPY composer.json composer.lock /app/
   6 | >>> RUN composer install --no-interaction --no-scripts --no-suggest
   7 |     COPY . /app
   8 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c composer install --no-interaction --no-scripts --no-suggest" did not complete successfully: exit code: 1
@dedfft
Copy link
Author

dedfft commented May 10, 2024

Screen 2024-05-10 at 19 14 32@2x

@channchetra
Copy link

Same Here

@sizucen
Copy link

sizucen commented Oct 2, 2024

My solution. Add this line in Dockerfile.

WORKDIR /app

Completed Dockerfile

FROM webdevops/php-nginx:8.2-alpine
WORKDIR /app
COPY ./dockerizer/php.ini /opt/docker/etc/php/php.ini
COPY ./dockerizer/vhost.conf /opt/docker/etc/nginx/vhost.conf
COPY composer.json composer.lock /app/
RUN composer install --no-interaction --no-scripts --no-suggest
COPY . /app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants