title: Why does "docker run" error with "no such file or directory"?
body: <p>I am trying to run a container which runs an automated build. Here is the dockerfile:</p>
  
  <pre><code>   FROM ubuntu:14.04
      MAINTAINER pmandayam
  
      # update dpkg repositories
      RUN apt-get update
  
      # install wget
      RUN apt-get install -y wget
  
      # get maven 3.2.2
      RUN wget --no-verbose -O /tmp/apache-maven-3.2.2.tar.gz http://archive.apache.or
      g/dist/maven/maven-3/3.2.2/binaries/apache-maven-3.2.2-bin.tar.gz
  
      # verify checksum
      RUN echo "87e5cc81bc4ab9b83986b3e77e6b3095 /tmp/apache-maven-3.2.2.tar.gz" | md5
      sum -c
  
      # install maven
      RUN tar xzf /tmp/apache-maven-3.2.2.tar.gz -C /opt/
      RUN ln -s /opt/apache-maven-3.2.2 /opt/maven
      RUN ln -s /opt/maven/bin/mvn /usr/local/bin
      RUN rm -f /tmp/apache-maven-3.2.2.tar.gz
      ENV MAVEN_HOME /opt/maven
  
      # remove download archive files
      RUN apt-get clean
  
      # set shell variables for java installation
      ENV java_version 1.8.0_11
      ENV filename jdk-8u11-linux-x64.tar.gz
      ENV downloadlink http://download.oracle.com/otn-pub/java/jdk/8u11-b12/$filename
  
      # download java, accepting the license agreement
      RUN wget --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie
      " -O /tmp/$filename $downloadlink
  
      # unpack java
      RUN mkdir /opt/java-oracle &amp;&amp; tar -zxf /tmp/$filename -C /opt/java-oracle/
      ENV JAVA_HOME /opt/java-oracle/jdk$java_version
      ENV PATH $JAVA_HOME/bin:$PATH
  
      # configure symbolic links for the java and javac executables
      RUN update-alternatives --install /usr/bin/java java $JAVA_HOME/bin/java 20000 &amp;
      &amp; update-alternatives --install /usr/bin/javac javac $JAVA_HOME/bin/javac 20000
  
      # install mongodb
      RUN echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen
      ' | sudo tee /etc/apt/sources.list.d/mongodb.list &amp;&amp; \
              apt-get update &amp;&amp; \
                  apt-get --allow-unauthenticated install -y mongodb-org mongodb-org-s
      erver mongodb-org-shell mongodb-org-mongos mongodb-org-tools &amp;&amp; \
  
                      echo "mongodb-org hold" | dpkg --set-selections &amp;&amp; \
                          echo "mongodb-org-server hold" | dpkg --set-selections &amp;&amp; \
                              echo "mongodb-org-shell hold" | dpkg --set-selections &amp;&amp;
       \
                                  echo "mongodb-org-mongos hold" | dpkg --set-selectio
      ns &amp;&amp; \
                                      echo "mongodb-org-tools hold" | dpkg --set-selec
      tions
  
      RUN mkdir -p /data/db
      VOLUME /data/db
  
      EXPOSE 27017
  
      COPY build-script /build-script
  
      CMD ["/build-script"]
  </code></pre>
  
  <p>I can build the image successfully but when I try to run the container I get this error: </p>
  
  <pre><code>$ docker run mybuild
  no such file or directory
  Error response from daemon: Cannot start container 3e8aa828909afcd8fb82b5a5ac894
  97a537bef2b930b71a5d20a1b98d6cc1dd6: [8] System error: no such file or directory
  </code></pre>
  
  <p>what does it mean 'no such file or directory'? </p>
  
  <p>Here is my simple script:</p>
  
  <pre><code>#!/bin/bash
  
  sudo service mongod start
  
  mvn clean verify
  
  sudo service mongod stop
  </code></pre>
  
  <p>I copy it like this: COPY build-script /build-script</p>
  
  <p>and run it like this: CMD ["/build-script"] not sure why its not working</p>