Amazon web services AWS Elasticbeanstalk Docker部署错误
我一直在使用dockrun.aws.json文件,但我不知道它应该如何工作。我是AWS Docker配置的新手,需要社区的帮助 每次我将docker映像部署到Elastic Beanstalk时,都会出现此错误Amazon web services AWS Elasticbeanstalk Docker部署错误,amazon-web-services,docker,amazon-elastic-beanstalk,dockerfile,Amazon Web Services,Docker,Amazon Elastic Beanstalk,Dockerfile,我一直在使用dockrun.aws.json文件,但我不知道它应该如何工作。我是AWS Docker配置的新手,需要社区的帮助 每次我将docker映像部署到Elastic Beanstalk时,都会出现此错误 [2017-12-19T19:38:40.877Z] ERROR [31251] : Command CMD-AppDeploy failed! [2017-12-19T19:38:40.879Z] INFO [31251] : Command processor returning
[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)
我的dockrun.aws.json文件
{
"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
我非常感谢在这个问题上能得到的任何帮助。我在这方面遇到了麻烦
谢谢。您的容器是否在本地制造并经过测试?它说它马上就要失败了。其次,它说无效的
卷
规范-看起来您传递的是一个空数组,您可能可以完全清除它。我知道docker映像可以工作,因为我已经在本地机器上使用docker compose对它进行了测试。我尝试不使用Volumes属性,但后来我遇到了另一个错误jq undefined或类似的错误