我一直在使用Dockerrun.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 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)
我的Dockerrun.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
感谢我在这个问题上能得到的任何帮助。我在这上面打了一堵墙。
感谢。