Skip to content
This repository was archived by the owner on Mar 13, 2019. It is now read-only.

Error when installing composer #124

Open
laics1984 opened this issue Apr 26, 2017 · 10 comments
Open

Error when installing composer #124

laics1984 opened this issue Apr 26, 2017 · 10 comments

Comments

@laics1984
Copy link

laics1984 commented Apr 26, 2017

Hi i am running when below command but it returns the error message. What is the issue here?

$ docker run --rm -v $(pwd):/app composer/composer install
Composer could not find a composer.json file in /app
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section

and i checked, composer.json is in pwd directory.

Thanks.

@Rainbowlemon
Copy link

Are you running this on Docker for Windows by any chance? I'm getting the same problem on my machine; it's saying the composer.json file doesn't exist, but it is definitely in the specified location.

@cian0
Copy link

cian0 commented Oct 12, 2017

Hi, any update for this issue? I am using Docker for Windows as well @Rainbowlemon have you found a workaround?

I used Powershell, CygWin, even Git Bash but to no avail.

@Rainbowlemon
Copy link

@cian0 It was a while ago, but I think I figured out this was to do with windows/bash returning a path that couldn't be interpreted by docker. It was because the path returned by $(pwd) was in windows-style format - similar to this comment.

@RobLoach
Copy link
Owner

Try just composer image. This Docker image has moved to the official one.

@Kenterfie
Copy link

I have the same issue.

@celorodovalho
Copy link

I have the same issue

@huynhquocbao92
Copy link

I just got the same issue, but still not resoved it :(

@anurag-do
Copy link

No solution as of now.

@RobLoach
Copy link
Owner

RobLoach commented Aug 2, 2018

This has moved over at https://hub.docker.com/_/composer/ ....

docker run --rm --interactive --tty \
    --volume $PWD:/app \
    composer install

@srntqn
Copy link

srntqn commented Nov 16, 2018

Guys, try to disable selinux. It should help.

setenforce 0

And rerun your build after that.

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

No branches or pull requests

9 participants