fre*_*lay 6 amazon-web-services docker
我有以下目录布局
./www/index.php
Dockerfile
apache-config.conf
Run Code Online (Sandbox Code Playgroud)
然后,我将文件压缩并上传到Elastic Beanstalk上,但收到以下错误消息:
[Instance: i-572d1ae8] Command failed on instance. Return code: 1 Output: Dockerfile and Dockerrun.aws.json are both missing, abort deployment. Hook /opt/elasticbeanstalk/hooks/appdeploy/pre/03build.sh failed. For more detail, check /var/log/eb-activity.log using console or EB CLI.
Run Code Online (Sandbox Code Playgroud)
日志文件包含以下消息:
AppDeployPreHook/01unzip.sh] : Completed activity. Result:
Archive: /opt/elasticbeanstalk/deploy/appsource/source_bundle
creating: /var/app/current/DI_Test/
inflating: /var/app/current/DI_Test/.DS_Store
creating: /var/app/current/__MACOSX/
creating: /var/app/current/__MACOSX/DI_Test/
inflating: /var/app/current/__MACOSX/DI_Test/._.DS_Store
inflating: /var/app/current/DI_Test/apache-config.conf
inflating: /var/app/current/DI_Test/Dockerfile
inflating: /var/app/current/__MACOSX/DI_Test/._Dockerfile
creating: /var/app/current/DI_Test/www/
inflating: /var/app/current/DI_Test/www/.DS_Store
creating: /var/app/current/__MACOSX/DI_Test/www/
inflating: /var/app/current/__MACOSX/DI_Test/www/._.DS_Store
inflating: /var/app/current/DI_Test/www/index.php
[2015-10-29T14:01:33.279Z] INFO [2865] - [Application deployment/StartupStage0/AppDeployPreHook/03build.sh] : Starting activity...
[2015-10-29T14:01:33.579Z] INFO [2865] - [Application deployment/StartupStage0/AppDeployPreHook/03build.sh] : Activity execution failed, because: Dockerfile and Dockerrun.aws.json are both missing, abort deployment (ElasticBeanstalk::ExternalInvocationError)
caused by: Dockerfile and Dockerrun.aws.json are both missing, abort deployment (Executor::NonZeroExitStatus)
Run Code Online (Sandbox Code Playgroud)
为什么我的dockerfile在这里没有被读取?我可以构建图像并在没有Elastic Beanstalk的情况下很好地运行它。
在您的项目文件夹中压缩这些内容(进入您的项目文件夹并压缩所有内容),而不是压缩您的项目文件夹。
我也遇到过这个问题。看来Dockerrun.aws.json还需要一个文件。我相信这是因为应用程序中包含其他文件。如果您只有 aDockerfile而没有其他,则不需要。
这是文档:http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_docker_image.html
| 归档时间: |
|
| 查看次数: |
4466 次 |
| 最近记录: |