gpt4 book ai didi

amazon-web-services - AWS Elastic Beanstalk Docker来自ECR错误 “No Docker image specified in Dockerrun.aws.json”

转载 作者:行者123 更新时间:2023-12-02 19:05:09 26 4
gpt4 key购买 nike

我正在尝试将AWS ECR的docker镜像部署到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字段中指定的位置。

    我在这里想念什么吗?

    最佳答案

    原来containerDefinitions在这种情况下不适用。我不确定在哪里找到它(也许来自某处的dockerrun示例)。实际的属性名称如下:

    {
    "AWSEBDockerrunVersion": "1",
    "Image": {
    "Name": "***.eu-central-1.amazonaws.com/***:latest",
    "Update": "true"
    },
    "Ports": [
    {
    "ContainerPort": "5000"
    }
    ],
    "Logging": "/var/log/nginx"
    }

    关于amazon-web-services - AWS Elastic Beanstalk Docker来自ECR错误 “No Docker image specified in Dockerrun.aws.json”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54206071/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com