Yet, the build succeeded on the Linux machine 🥳 The file content looked the same after formatting it to UNIX style. What we did to fix is converting the file format to UNIX style using dos2unix: dos2unix your-file.sh Fixing the file format: change to UNIX style This caused the Docker build to fail on a Linux machine.
Saving the Dockerfile used the default Windows file format. We created the Dockerfile on a Windows machine. In our case, the issue occurred due to a Windows-style file ending. The error message is misleading in terms of a wrong file path or path reference. Standard_init_linux.go:211: exec user process caused „no such file or directory“ Status: Downloaded newer image for docker:stable The Docker build output looked like this: … The “exec user process caused „no such file or directory“” issue occurred when executing a shell script. Let’s fix this!ĭocker outputs all build steps when creating an image based on a Dockerfile. The problem: a wrong file format caused by Windows. Yet, when pushing the code to the build server (in this case GitHub), building the Docker image failed wit the mentioned error. We ran into the following error when creating Docker-based GitHub Actions: the “standard_init_linux.go:211: exec user process caused „no such file or directory“”Įverything worked locally and the Dockerfile looked good as well.