Did Dockerhub rate limit affect Github Action?

Recently, Docker hub update their pricing, download rate limit and retention policy. I’m wondering if it affects Github Action? And how?

Will those steps are affected?

jobs:
  my_first_job:
    steps:
      - uses: docker://alpine:3.11
jobs:
  my_first_job:
    steps:
      - run: docker pull alpine:3.11
1 Like

@rammusxu,

According to the introductions from the docs you shared about “Download rate limit”, the limit seems only applies for the anonymous users. Logged in users will not be affected at this time.

I setup a workflow with the following step that pull an image 101 times in a loop.

- name: Test Docker download rate limits
  run: |
    docker image ls
    index=1
    while [ $index -le 101 ]
    do
      echo "---------------------------------------------------------------------------------------"
      echo "Pull image $index times"
      docker pull alpine:3.11
      docker image ls
      index=$(( $index + 1 ))
      docker image rm alpine:3.11
    done
    docker image ls

However, it can successfully download the image 101 times without any warning or error messages about the download rate limit.

When we try to pull some public images in the workflow, if we do not login with any of our accounts, not sure if GitHub has a default account to login the docker.

I have created an issue ticket (actions/virtual-environments#1445) to help you report the questions to the appropriate engineering team for further discussion and evaluation.
You can follow this issue ticket and directly add your comments on it.

1 Like

From their Download rate limit page:

Docker will gradually introduce these rate limits, with full effects starting from November 1st, 2020.

It might simply not be enforced yet.

As per their Pricing page, logged in users on the free tier have a limit too:

Data transfer (per 6 hours) Free
Anonymous users 100 pulls
Authenticated users (Docker ID) 200 pulls
1 Like

So, if I do have a paid account that I want to use, how do I get Actions to log in prior to pulling alpine:3.11 in the example of the OP?

I’d also want to log in prior to building any images for actions I use.

My attempts to use docker/login-action@v1 suggest that it doesn’t do what I want, i.e. the login is either in another job or it happens after the image is pulled (or the Action image is built).

My attempts to you a run: step to log in also fails… The Action image is built before the login here too.

From https://github.com/actions/virtual-environments/issues/1445#issuecomment-713861495:

For publicly accessible containers we are working with docker hub to make sure you will not be impacted by the new rate limits. If you need private containers we still do not have a solution for that problem for forks of public repos.

We just ran into Drone Cloud builds failing as a result of them testing the lower rate limit. The good news is GitHub Actions is probably a much larger CI service, and Docker has a blog post here about working with partners to ensure uninterrupted access to Docker Hub images.