K
K
Kirill Kontorovich2019-04-02 10:34:41
Docker
Kirill Kontorovich, 2019-04-02 10:34:41

Php container does not start in docker, how to solve the problem?

I am running docker-compose. As a result I get an error:

php_1       | /usr/local/bin/docker-entrypoint.sh: line 2: $'\r': command not found
php_1       | Do not run Composer as root/super user! See https://getcomposer.org/root for details
php_1       |
php_1       |
php_1       |   [Symfony\Component\Console\Exception\CommandNotFoundException]
" is not defined.
php_1       |
php_1       |   Did you mean this?
php_1       |       update
php_1       |
php_1       |
php_1       | /usr/local/bin/docker-entrypoint.sh: line 4: $'\r': command not found
: not found | /usr/local/bin/docker-entrypoint.sh: line 5: exec: php-fpm

I've tried restarting docker, removing containers and restarting but nothing helps
I was using Ubuntu, now I've installed Windows myself and now I'm getting this error. Please tell me how can I solve this problem, I spent more than 3 hours and no result (

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Q
qlkvg, 2019-04-02
@ishimitsu

Wang that at the beginning of the file /usr/local/bin/docker-entrypoint.sh there is a line like "/bin/bash". After editing under Windows at the end of this line, a standard Windows CRLF was formed, while Linux uses only LF. Solved by setting line break in your editor.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question