title: Docker: standard_init_linux.go:211: exec user process caused "no such file or directory"
body: <p>I am trying to create a base image following the instructions given in official docker webpage(<a href="https://docs.docker.com/samples/library/scratch/" rel="noreferrer">https://docs.docker.com/samples/library/scratch/</a>)</p>
  
  <pre><code>    docker --version
      Docker version 18.09.6, build 481bc77
  
      OS Details:
      NAME="Ubuntu"
      VERSION="18.04.2 LTS (Bionic Beaver)"
  </code></pre>
  
  <p>DockerFile:</p>
  
  <pre><code>    FROM scratch
      COPY hello /
      CMD ["/hello"]
  </code></pre>
  
  <p>hello.c</p>
  
  <pre><code>    #include &lt;stdio.h&gt;
          int main()
          {
             // printf() displays the string inside quotation
             printf("Hello, World!");
             return 0;
          }
  </code></pre>
  
  <p>I am able to compile the C program and execute locally</p>
  
  <p>I am able to build the image using the dockerfile but when I try to run the container, I get the below error:</p>
  
  <pre><code>    # docker run -i hello
          standard_init_linux.go:211: exec user process caused "no such file or directory" 
      #
  </code></pre>
  
  <p>I expect the container to run successfully and print "Hello World" on console.
  most of the answers provided are asking to change EOL which is not applicable as we are already on Linux and not trying to run script.</p>