Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exec /root/scripts/run.sh: no such file or directory #16

Open
Neznakomec opened this issue Aug 20, 2022 · 3 comments
Open

exec /root/scripts/run.sh: no such file or directory #16

Neznakomec opened this issue Aug 20, 2022 · 3 comments

Comments

@Neznakomec
Copy link

Neznakomec commented Aug 20, 2022

I can't run the docker container
and can't figure why it happen, cause container have a /scripts/run.sh file inside it

docker-compose up
ib-gateway-docker_ib-gateway_1 is up-to-date
Attaching to ib-gateway-docker_ib-gateway_1
ib-gateway_1 | exec /root/scripts/run.sh: no such file or directory

@Neznakomec
Copy link
Author

I've tried to change launch command a bit
from
CMD ["/root/scripts/run.sh"]
to
CMD ["bash", "/root/scripts/run.sh"]

Script is launching now, but I have an error
ib-gateway-docker-ib-gateway-1 | /root/scripts/run.sh: line 2: $'\r': command not found
ib-gateway-docker-ib-gateway-1 | /root/scripts/run.sh: line 4: $'\r': command not found
ib-gateway-docker-ib-gateway-1 | /root/scripts/run.sh: line 6: $'\r': command not found
ib-gateway-docker-ib-gateway-1 | /root/scripts/run.sh: line 7: $'\r': command not found
ib-gateway-docker-ib-gateway-1 | /root/scripts/run.sh: line 20: syntax error: unexpected end of file
ib-gateway-docker-ib-gateway-1 exited with code 2

@Neznakomec
Copy link
Author

It seems that image totally not compatible for 'Docker for Windows'

@Neznakomec
Copy link
Author

Oh, I found a source of errors - conversion to Windows line endings when git clone a repository
https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings

It's very bad line endings for Docker and *.sh scripts

I tried to download zip archive from github and replace all files, and now it works!

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

No branches or pull requests

1 participant