title: Error Docker deployment in Amazon Elastic Beanstalk - Docker container quit unexpectedly
body: <p>I am trying deploy a simple docker container through Elastic Beanstalk but I am getting Docker container quit unexpectedly error. Not sure what is wrong here. Thanks in advance for the help. </p>
  
  <p>Dockerrun.aws.json:</p>
  
  <pre><code>{
    "AWSEBDockerrunVersion": "1",
    "Image": {
      "Name": "janedoe/image",
      "Update": "true"
    },
    "Ports": [{
      "ContainerPort": "10010"
    }],
    "Volumes": [{
      "HostDirectory": "/home/ec2-user/testdocker",
      "ContainerDirectory": "/home/ec2-user/testdocker"
    }],
    "Logging": "/home/ec2-user/testlogs"
  }
  </code></pre>
  
  <p>Dockerfile:</p>
  
  <pre><code>FROM centos:centos6
  MAINTAINER janedoe
  </code></pre>
  
  <p>RUN echo "test"
  EXPOSE 10010</p>
  
  <p>Log :</p>
  
  <pre><code>[2016-03-22T22:56:35.034Z] INFO  [15895] - [Application       update/AppDeployStage0/AppDeployPreHook/03build.sh] : Completed activity.     
  Result:
    centos6: Pulling from library/centos
    Digest: sha256:ec1bf627545d77d05270b3bbd32a9acca713189c58bc118f21abd17ff2629e3f
    Status: Image is up to date for centos:centos6
    Successfully pulled centos:centos6
    Sending build context to Docker daemon 4.608 kB
    Sending build context to Docker daemon 4.608 kB
  
    Step 1 : FROM centos:centos6
     ---&gt; ed452988fb6e
    Step 2 : MAINTAINER janedoe
     ---&gt; Running in 8bce7dfb7e59
     ---&gt; 04de6fffed04
    Removing intermediate container 8bce7dfb7e59
    Step 3 : RUN echo "test"
     ---&gt; Running in 36cef1d7c0e5
    test
     ---&gt; c5b3d119184c
    Removing intermediate container 36cef1d7c0e5
    Step 4 : EXPOSE 10010
     ---&gt; Running in ea07cbcc1136
     ---&gt; 45f9b3fe6503
    Removing intermediate container ea07cbcc1136
    Successfully built 45f9b3fe6503
    Successfully built aws_beanstalk/staging-app
  [2016-03-22T22:56:35.034Z] INFO  [15895] - [Application update/AppDeployStage0/AppDeployPreHook] : Completed activity. Result:
    Successfully execute hooks in directory /opt/elasticbeanstalk/hooks/appdeploy/pre.
  [2016-03-22T22:56:35.035Z] INFO  [15895] - [Application update/AppDeployStage0/EbExtensionPostBuild] : Starting activity...
  [2016-03-22T22:56:35.550Z] INFO  [15895] - [Application update/AppDeployStage0/EbExtensionPostBuild/Infra-EmbeddedPostBuild] : Starting activity...
  [2016-03-22T22:56:35.550Z] INFO  [15895] - [Application update/AppDeployStage0/EbExtensionPostBuild/Infra-EmbeddedPostBuild] : Completed activity.
  [2016-03-22T22:56:35.587Z] INFO  [15895] - [Application update/AppDeployStage0/EbExtensionPostBuild] : Completed activity.
  [2016-03-22T22:56:35.588Z] INFO  [15895] - [Application update/AppDeployStage0/InfraCleanEbextension] : Starting activity...
  [2016-03-22T22:56:36.107Z] INFO  [15895] - [Application update/AppDeployStage0/InfraCleanEbextension] : Completed activity. Result:
    Cleaned ebextensions subdirectories from .
  [2016-03-22T22:56:36.107Z] INFO  [15895] - [Application update/AppDeployStage0] : Completed activity. Result:
    Application update - Command CMD-AppDeploy stage 0 completed
  [2016-03-22T22:56:36.107Z] INFO  [15895] - [Application update/AppDeployStage1] : Starting activity...
  [2016-03-22T22:56:36.108Z] INFO  [15895] - [Application update/AppDeployStage1/AppDeployEnactHook] : Starting activity...
  [2016-03-22T22:56:36.108Z] INFO  [15895] - [Application update/AppDeployStage1/AppDeployEnactHook/00run.sh] : Starting activity...
  [2016-03-22T22:56:44.157Z] INFO  [15895] - [Application update/AppDeployStage1/AppDeployEnactHook/00run.sh] : Activity execution failed, because: 268f1a5e43874771bc6039977e9eb048e704c0b94a5e100a2a9ffbf2d9d7f271
    Docker container quit unexpectedly after launch: Docker container quit unexpectedly on Tue Mar 22 22:56:44 UTC 2016:. Check snapshot logs for details. (ElasticBeanstalk::ExternalInvocationError)
  caused by: 268f1a5e43874771bc6039977e9eb048e704c0b94a5e100a2a9ffbf2d9d7f271
    Docker container quit unexpectedly after launch: Docker container quit unexpectedly on Tue Mar 22 22:56:44 UTC 2016:. Check snapshot logs for details. (Executor::NonZeroExitStatus)
  </code></pre>