astuto/astuto

Windows Docker Error - standard_init_linux.go:211: exec user process caused "no such file or directory"

Closed this issue ยท 12 comments

This happens in windows environments.

To advance the topic you should edit all .sh files in the repo and change the EOL from CRLF to LF. This fixes the issue.
Then another bug appeared btw:

PG:Bad connection.......
Added db to windows hosts and added port 5432 to the docker-file in ports for db.

Works in Windows now ;)

Hey joaotnlima, thanks for posting!

standard_init_linux.go:211 is a well known issue for Windows users.

you should edit all .sh files in the repo and change the EOL from CRLF to LF

Yes, EOL are a problem in Windows. I think you wanted to say to change them from LF to CRLF.

Added db to windows hosts and added port 5432 to the docker-file in ports for db

Could you elaborate more on this, please? For the windows hosts you mean the host file c:\windows\system32\drivers\etc\hosts?

Yes, EOL are a problem in Windows. I think you wanted to say to change them from LF to CRLF.

I believe you need to change them to LF - at least i did that.

Could you elaborate more on this, please? For the windows hosts you mean the host file

Yes correct. I believe there is a better way, but i just wanted it working right away
image

I tried your solution but it doesn't work on my machine. I'm on Windows 10 Home and I'm using Docker Toolbox (because Docker Desktop is not compatible with Windows 10 Home). What OS and Docker are you using?

I believe you need to change them to LF - at least i did that.

Can you please check whether all files are in LF or just the ones you manually changed?

All files (.sh) are LF including Dockerfile and docker-compose.yml.

I'm using windows 10 Pro Version 10.0.18362 Build 18362
Docker Desktop 2.1.0.5 (40693)

image
image

Thanks for the information. In these day I've been pretty busy, I'll try it out in a few days.

Unfortunately I was not able to make it work on my machine.

If you want, you can open a pull request with the changes to make it work under Windows. Then we'll ask for other windows users to test it and, when it works, merge it.

Hello

Could you elaborate more on this, please? For the windows hosts you mean the host file

Yes correct. I believe there is a better way, but i just wanted it working right away

Would you mind to explain more about hosts of windows?
I faced a problem creating db.

you should edit all .sh files in the repo and change the EOL from CRLF to LF

Yes, EOL are a problem in Windows. I think you wanted to say to change them from LF to CRLF.

Had the same issue on Docker
I changed my shell script on Windows 10 from CRLF to LF and that worked for me!

you should edit all .sh files in the repo and change the EOL from CRLF to LF

Yes, EOL are a problem in Windows. I think you wanted to say to change them from LF to CRLF.

Had the same issue on Docker
I changed my shell script on Windows 10 from CRLF to LF and that worked for me!

Same here, CRLF to LF helped to fix

you should edit all .sh files in the repo and change the EOL from CRLF to LF

Yes, EOL are a problem in Windows. I think you wanted to say to change them from LF to CRLF.

Had the same issue on Docker
I changed my shell script on Windows 10 from CRLF to LF and that worked for me!

Same here, thanks!

This happens in windows environments.

To advance the topic you should edit all .sh files in the repo and change the EOL from CRLF to LF. This fixes the issue.
Then another bug appeared btw:

PG:Bad connection.......
Added db to windows hosts and added port 5432 to the docker-file in ports for db.

Works in Windows now ;)

I would like to know how you did this. I'm very new and this is my first time building a docker app. No idea what files I need to change or how. You say edit all .sh files. I only have one, my entrypoint.sh that the Rails Docker-Compose quickstart guide shows how to build the Dockerfile and stuff. I've built my rails app image, which is my portfolio I'm going to build, and got the server to start and everything on my laptop. But when I come to my desktop to pull the image down and docker-compose up, I'm getting this error we're talking about in this thread. So what part of the file am I changing? am I REPLACING .sh? or adding the LF after it?

You can use this code in your dockerfile to fix line breaks:

RUN sed -i -e 's/\r$//' /entrypoint.sh

Replace /entrypoint.sh with the path to the file with the suspected wrong line breaks.