DEV Community

tarohida
tarohida

Posted on

docker-compose `/docker-entrypoint.sh: exec: line 24: require: not found`

Environment

  • Ubuntu 18.04 LTS
  • Docker Composer Container

Problem

run follow command.

docker-compose run composer require phpunit/phpunit
Enter fullscreen mode Exit fullscreen mode

got error.

/docker-entrypoint.sh: exec: line 24: require: not found
Enter fullscreen mode Exit fullscreen mode

How to solve it.

remove composer.json file.

$ rm ./composer.json 
Enter fullscreen mode Exit fullscreen mode

and re-run. succeeded.

docker-compose run composer require phpunit/phpunit
Enter fullscreen mode Exit fullscreen mode

Description.

when I run --help command, i got Execption Output.

$ docker-compose run composer --help


  [Seld\JsonLint\ParsingException]                                        
  "./composer.json" does not contain valid JSON                           
  Parse error on line 1:                                                  

  ^                                                                       
  Expected one of: 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '['  

Enter fullscreen mode Exit fullscreen mode

composer.json file is empty.

$ cat ./composer.json
$
Enter fullscreen mode Exit fullscreen mode

Top comments (0)