Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 784
Gil Avatar asked Aug 05 '19 20:08

Gil


People also ask

What is the difference between entrypoint and CMD in Docker?

The ENTRYPOINT instruction looks almost similar to the CMD instruction. However, the main highlighting difference between them is that it will not ignore any of the parameters that you have specified in the Docker run command (CLI parameters).

How do you expose a Docker container?

Need of exposing ports. In order to make a port available to services outside of Docker, or to Docker containers which are not connected to the container's network, we can use the -P or -p flag. This creates a firewall rule which maps a container port to a port on the Docker host to the outside world.

What is Docker from scratch?

FROM scratch As of Docker 1.5. 0 (specifically, docker/docker#8827 ), FROM scratch is a no-op in the Dockerfile , and will not create an extra layer in your image (so a previously 2-layer image will be a 1-layer image instead).


1 Answers

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

like image 190
Akvel Avatar answered Oct 11 '22 12:10

Akvel