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달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠