我正在尝试将 Docker 映像从 AWS ECR 部署到 Elastic Beanstalk。我已经为 S3 和 ECR 设置了 Elastic Beanstalk 所需的所有权限。这些服务之间的通信似乎很好,但是在尝试启动 Elastic Beanstalk 环境时出现以下错误:
No Docker image specified in either Dockerfile or Dockerrun.aws.json. Abort deployment.
[Instance: i-01cf0bac1863e4eda] Command failed on instance. Return code: 1 Output: No Docker image specified in either Dockerfile or Dockerrun.aws.json. 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.
我正在上传一个Dockerrun.aws.json
指向 ECR 上图像的单曲。下面是我的Dockerrun.aws.json
文件:
{
"AWSEBDockerrunVersion": "1",
"containerDefinitions": {
"Name": "***.eu-central-1.amazonaws.com/***:latest",
"Update": "true"
},
"Ports": [
{
"ContainerPort": "5000"
}
],
"Logging": "/var/log/nginx"
}
docker 映像确实存在于 ECR 上containerDefinitions
Name
字段中指定的位置。
我在这里错过了什么吗?