mercredi 6 mai 2015

Error Docker deployment in Amazon EC2

I am trying to deploy a Dockerfile and a Dockerrun.aws.json in Amazon EC2. I am able to successfully create the Docker container but after that, the instance is crashing. That is why I suppose that the error is related to the Dockerrun.aws.json but I dont know how to fix it .

Log:

    Step 36 : RUN service apache2 stop && service apache2 start
       ---> Running in 1531cdba4bf1
    Stopping web server: apache2.
    [91m/usr/sbin/apache2ctl: 87: ulimit: error setting limit (Operation not  permitted)
    [0m[91mSetting ulimit failed. See README.Debian for more information.
    [0m[91mAH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.32. Set the 'ServerName' directive globally to suppress this message
    [0mStarting web server: apache2.

   ---> 86403887587f
  Removing intermediate container 1531cdba4bf1
  Step 37 : EXPOSE 80
   ---> Running in 395114dad85b
   ---> 7350f1436bc2
  Removing intermediate container 395114dad85b
  Successfully built 7350f1436bc2
  Successfully built aws_beanstalk/staging-app
    [2015-04-21T15:16:46.558Z] INFO  [1799]  - [CMD-Startup/StartupStage0/AppDeployPreHook/04run.sh] : Starting activity...
    [2015-04-21T15:16:54.493Z] INFO  [1799]  - [CMD-Startup/StartupStage0/AppDeployPreHook/04run.sh] : Activity execution failed, because: command failed with error code 1: /opt/elasticbeanstalk/hooks/appdeploy/pre/04run.sh
    d84f98c9e97a7287ca461510866d32adec0da73cbe5a7abcb8201490332a0f48
    Docker container quit unexpectedly after launch: Docker container quit unexpectedly on Tue Apr 21 15:16:54 UTC 2015:. Check snapshot logs for details. (Executor::NonZeroExitStatus)
        at /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/executor-1.0/lib/executor/exec.rb:81:in `sh'
        from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/executor-1.0/lib/executor.rb:15:in `sh'
        from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/executable.rb:63:in `execute!'
        from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/hook-directory-executor.rb:29:in `block (2 levels) in run!'

I can copy paste more information of the Log if needed, but I think that the other part was not relevant.

My Dockerrun.aws.json is the following:

{

    "AWSEBDockerrunVersion": "1",
    "Ports": [
        {
            "ContainerPort":"80"
        }
    ],
    "Volumes":{

    }
}




Aucun commentaire:

Enregistrer un commentaire