问题
I am building the docker image of my project using the Dockerfile provided with it but docker container is always remains in restarting state. Below is the container log which I see:- standard_init_linux.go:211: exec user process caused "no such file or directory" Can some one prove me with the possible solution to it and also tell what's the root cause of this issue.
回答1:
In my case, this issue was because I had Windows-style line endings on my docker file script for Linux.
I fixed this by running dos2unix on the file so that it now had Unix-style line endings.
回答2:
You don't give a lot of information but: I had a similiar error before that happened because some files copied (added or as volume) to the container had windows line endings instead of linux line endings... To fix it I used the program dos2unix to change the line endings of the file. Maybe this can help you. (also check this: https://forums.docker.com/t/standard-init-linux-go-175-exec-user-process-caused-no-such-file/20025/2)
来源:https://stackoverflow.com/questions/57590432/standard-init-linux-go211-exec-user-process-caused-no-such-file-or-directory