Closed fleduc closed 4 years ago
This is an an issue with Windows line endings \r
.
From my Windows OS to bypass the \r
issue I run the command like this:
docker-compose run --rm backend php init
Here is a good article on the difference between Windows and Linux line endings: https://willi.am/blog/2016/08/11/docker-for-windows-dealing-with-windows-line-endings/
Thanks vkaterusha.
I have found that this can also be solved by using this command:
docker-compose run --rm backend php /app/init
or this one
docker-compose run --rm backend php init
Could documentation be modified?
Thanks again
Yes. A pull request would be very helpful.
I have noticed that I have the same behavior with this command:
docker-compose run --rm backend yii migrate
but it work with this one
docker-compose run --rm backend php yii migrate
I'll add this too in the pull request.
I'm trying to start a new Yii2 advanced project using Docker.
Since I'm only using Docker on my local dev environment (no Php, Composer, etc installed locally), I've followed your "Installing using Docker" procedure found here
As per your procedure, in my console (Cmder).
Running this command worked docker-compose run --rm backend composer install
Running this command did not work docker-compose run --rm backend /app/init
Error message: usermod: no changes /usr/bin/env: 'php\r': No such file or directory
Note: Yesterday I've tried to create a basic Yii2 project using your Git basic repo and procedure and everything worked seamlessly.
Can somebody help me here?
Thanks
Additional info