AWS Code Build - Error When Using GitHub Actions - toomanyrequests: You have reached your pull rate limit

0

Hi,

I am using the new feature of CodeBuild of being able to use GitHub Actions

I am getting the following error:

[Container] 2023/07/21 09:11:29 Sending build context to Docker daemon  26.11kB
[Container] 2023/07/21 09:11:29 
[Container] 2023/07/21 09:11:29 Step 1/11 : FROM ruby:3

[Container] 2023/07/21 09:11:29 toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit
[Container] 2023/07/21 09:11:29 ##[error]Docker build failed with exit code 1

And for context my buildspec file looks like this:

version: 0.2
phases:
  build:
    steps:
      - name: "Run JSON Syntax Check"
        uses: limitusus/json-syntax-check@v2
        with:
          pattern: "\\.json$"
      - name: "Lint Dockerfile"
        id: hadolint
        uses: hadolint/hadolint-action@54c9adbab1582c2ef04b2016b760714a4bfde3cf
        with:
          dockerfile: app/Dockerfile
      - name: "Markdown Lint Action"
        uses: articulate/actions-markdownlint@v1
        with:
          config: .config/.markdownlint.json
          ignore: 'changelogs'

Is there a way around this?

There has been an issue raised on this error in the past but the scenario there is when GitHub runners are being used. It looks like there has been an agreement put in place between Docker and GitHub only for when runners are used.

I was also interested to know if AWS would be looking into something similar?

jans
已提问 10 个月前386 查看次数
1 回答
0

Workaround is to use ECR:

https://stackoverflow.com/questions/65806330/toomanyrequests-you-have-reached-your-pull-rate-limit-you-may-increase-the-lim

aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws

So you can use something like this: (some fields are empty)

 steps:

    - name: Check out code
      uses: actions/checkout@v2
    
    - name: Configure AWS credentials
      uses: aws-actions/configure-aws-credentials@v1
      with:
        aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
        aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
        aws-region: 

    - name: Login to Amazon ECR
      id: login-ecr
      uses: aws-actions/amazon-ecr-login@v1

    - name: Build, tag, and push image to Amazon ECR
      env:
        ECR_REGISTRY: 
        ECR_REPOSITORY: 
        IMAGE_TAG: 
      run: |
        docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
        docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
profile picture
已回答 10 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则

相关内容