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

16,673

It is because you checkout files from github in windows end of line style \r\n

You need manually convert EOL style to \n for all .sh/.bash files

Share:
16,673
Gil
Author by

Gil

Updated on July 08, 2022

Comments

  • Gil
    Gil almost 2 years

    I have a situation where I have codes stored in GitHub, a Jenkins Pipeline to clone repo and build a docker image. But when run the image I got the following error:

    standard_init_linux.go:211: exec user process caused "no such file or directory"
    

    But I am able to create a docker image using my local directory and command line to build and run the images successfully.

    Note: I am using Windows with Docker Desktop for Windows, and Jenkins installed

    I expect to have the docker image to run as I expected using command line.

  • Joseph Adam
    Joseph Adam over 2 years
    October 2021! Still works. Went into my .sh and beautified code with pycharm shell script formatter