Home:ALL Converter>AWS Elasticbeanstalk Docker Errors Deploying

AWS Elasticbeanstalk Docker Errors Deploying

Ask Time:2017-12-20T04:07:35         Author:Scott Deutsch

Json Formatter

I have been playing with the Dockerrun.aws.json file and I can't figure out how it should work. I am new to AWS Docker config stuff and just need the communities help with this.

Everytime I deploy to the docker image to Elastic Beanstalk I get this error.

[2017-12-19T19:38:40.877Z] ERROR [31251] : Command CMD-AppDeploy failed!
[2017-12-19T19:38:40.879Z] INFO  [31251] : Command processor returning results: 
{"status":"FAILURE","api_version":"1.0","results":[{"status":"FAILURE","msg":"(TRUNCATED)...spec \":\": invalid volume specification: ':'.\nSee 'docker run --help'.\nFailed to run Docker container: docker: Error response from daemon: invalid volume spec \":\": invalid volume specification: ':'.\nSee 'docker run --help'.. Check snapshot logs for details. \nHook /opt/elasticbeanstalk/hooks/appdeploy/enact/00run.sh failed. For more detail, check /var/log/eb-activity.log using console or EB CLI","returncode":125,"events":[{"msg":"Successfully pulled image:latest","severity":"TRACE","timestamp":1513712291},{"msg":"Successfully built aws_beanstalk/staging-app","severity":"TRACE","timestamp":1513712317},{"msg":"Failed to run Docker container: docker: Error response from daemon: invalid volume spec \":\": invalid volume specification: ':'.\nSee 'docker run --help'.. Check snapshot logs for details.","severity":"ERROR","timestamp":1513712320}]}],"truncated":"true"}
....
[2017-12-19T19:48:57.688Z] ERROR [31884] : Command execution failed: Activity failed. (ElasticBeanstalk::ActivityFatalError)
caused by: 5503805a9751c924331669930c577b50628d1d0967015c301671f151e207312e
  Docker container quit unexpectedly after launch: Docker container quit unexpectedly on Tue Dec 19 19:48:57 UTC 2017:
  /bin/sh: 1: Syntax error: "(" unexpected. Check snapshot logs for details. (ElasticBeanstalk::ExternalInvocationError)
caused by: 5503805a9751c924331669930c577b50628d1d0967015c301671f151e207312e
  Docker container quit unexpectedly after launch: Docker container quit unexpectedly on Tue Dec 19 19:48:57 UTC 2017:
  /bin/sh: 1: Syntax error: "(" unexpected. Check snapshot logs for details. (Executor::NonZeroExitStatus)

My Dockerrun.aws.json file

{
  "AWSEBDockerrunVersion": "1",
  "Image": {
    "Name": "path/to/image:latest",
    "Update": "true"
  },
  "Authentication": {
    "Bucket": "mybucket",
    "Key": "dockercfg"
  },
  "Ports": [
    {
      "ContainerPort": "80"
    }
  ],
  "Volumes": []
}

Dockerfile

FROM node:latest

WORKDIR /app

ADD package.json /app
RUN npm i --production
ADD . /app

RUN node ./node_modules/grunt/bin/grunt prod
CMD npm start
EXPOSE 80

I appreciate any help I can get on this issue. I am hitting a wall on this.

Thanks.

Author:Scott Deutsch,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/47894447/aws-elasticbeanstalk-docker-errors-deploying
yy