Answer the question
In order to leave comments, you need to log in
How to run Composer in Docker?
Hello! I want to add a project to docker. I enter the command docker-compose run --rm php composer update --prefer-dist , the image is loaded, but the composer does not want to work, writes Composer could not find a composer.json file in /var/www/html
As far as I understand, this file it is already read in the image (I already forcibly threw it off, but there is no result). Please tell me what am I doing wrong?
Here is the config file docker-compose.yml
version: '2'
services:
php:
image: yiisoftware/yii2-php:7.1-apache
volumes:
- ~/.composer-docker/cache:/root/.composer/cache:delegated
- ./:/app:delegated
ports:
- '8000:80'
Apache is running on this port.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question