Thread
#general
    a

    agreeable-king-2755

    6 months ago
    Hey all, we're building an open climate policy database, and I've stitched together a AWS/Python-based Pulumi config here: https://github.com/climatepolicyradar/navigator/blob/7b3b941d93ce25bc4b8067900d749daa58def81f/infra/__main__.py However, the last hurdle seems to be Elastic Beanstalk, failing with
    Error: failed to pull docker image
    I'm not sure where to authenticate the docker pull, so any pointers will be appreciated.
    perhaps
    Dockerrun.aws.json
    is missing something like this:
    "Authentication": {
        "Bucket": "mybucket",
        "Key": "docker_hub_auth.json"
      },
    does anyone have an example of how to achieve the above?
    f

    freezing-van-87649

    6 months ago
    Have you tried the ECR credential helper? https://github.com/awslabs/amazon-ecr-credential-helper
    a

    agreeable-king-2755

    6 months ago
    I can get the image into ECR, but the issue is Elastic Beanstalk pulling it. Will ECR Credential Helper help with that? I.e. will it be able to render something I can put in the relevant "Authentication" section in Dockerrun.aws.json ?
    hmm, the EB log is not auth-related, but has "invalid reference format". I'll look into that (seems as though the image is in an array, not a string).
    2022/03/15 14:59:36.478717 [ERROR] An error occurred during execution of command [app-deploy] - [Docker Specific Build Application]. Stop running the command. Error: failed to pull docker image: Command /bin/sh -c docker pull ['992954656374.dkr.ecr.eu-west-2.amazonaws.com/cpr-container-registry-043f64e:xxxxxxx'] failed with error exit status 1. Stderr:invalid reference format