Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use GitHub Docker Registry #491

Closed
martijn-exads opened this issue Oct 15, 2024 · 3 comments · Fixed by #495
Closed

Use GitHub Docker Registry #491

martijn-exads opened this issue Oct 15, 2024 · 3 comments · Fixed by #495

Comments

@martijn-exads
Copy link

martijn-exads commented Oct 15, 2024

I was wondering if it would be possible to move the Docker container to use GitHub Docker Registry instead?

I am hitting the Docker Hub pull limit (HTTP 429) in my pipeline a lot which results in failures. GitHub should not have any limits on how much you can pull an image.

@martijn-exads
Copy link
Author

Provide the logs from the GitHub Action run

2024-10-14T16:27:10.4223076Z ##[group]Build container for action use: '/home/runner/work/_actions/py-cov-action/python-coverage-comment-action/v3/Dockerfile'.
2024-10-14T16:27:10.4466561Z ##[command]/usr/bin/docker build -t a3a522:fdfacc91aafc4dbcb7939a4e03e0b6fc -f "/home/runner/work/_actions/py-cov-action/python-coverage-comment-action/v3/Dockerfile" "/home/runner/work/_actions/py-cov-action/python-coverage-comment-action/v3"
2024-10-14T16:27:10.9337273Z #0 building with "default" instance using docker driver
2024-10-14T16:27:10.9338608Z 
2024-10-14T16:27:10.9339270Z #1 [internal] load build definition from Dockerfile
2024-10-14T16:27:10.9340781Z #1 transferring dockerfile: 245B done
2024-10-14T16:27:10.9341644Z #1 DONE 0.0s
2024-10-14T16:27:10.9342063Z 
2024-10-14T16:27:10.9342824Z #2 [auth] ewjoachim/python-coverage-comment-action-base:pull token for registry-1.docker.io
2024-10-14T16:27:10.9344334Z #2 DONE 0.0s
2024-10-14T16:27:10.9344690Z 
2024-10-14T16:27:10.9345647Z #3 [internal] load metadata for docker.io/ewjoachim/python-coverage-comment-action-base:v6
2024-10-14T16:27:11.1254585Z #3 ERROR: failed to copy: httpReadSeeker: failed open: unexpected status code https://registry-1.docker.io/v2/ewjoachim/python-coverage-comment-action-base/manifests/sha256:900716dbf7ec02e55775d7ddb5f2d66ee96e53f403e3364b6b85c59a691ee44d: 429 Too Many Requests - Server message: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit
2024-10-14T16:27:11.1384732Z ------
2024-10-14T16:27:11.1386413Z  > [internal] load metadata for docker.io/ewjoachim/python-coverage-comment-action-base:v6:
2024-10-14T16:27:11.1388065Z ------
2024-10-14T16:27:11.1424981Z Dockerfile:2
2024-10-14T16:27:11.1426702Z --------------------
2024-10-14T16:27:11.1428795Z    1 |     # See Dockerfile.build for instructions on bumping this.
2024-10-14T16:27:11.1430911Z    2 | >>> FROM ewjoachim/python-coverage-comment-action-base:v6
2024-10-14T16:27:11.1432969Z    3 |     
2024-10-14T16:27:11.1434942Z    4 |     COPY coverage_comment ./coverage_comment
2024-10-14T16:27:11.1437036Z --------------------
2024-10-14T16:27:11.1449633Z ERROR: failed to solve: ewjoachim/python-coverage-comment-action-base:v6: failed to resolve source metadata for docker.io/ewjoachim/python-coverage-comment-action-base:v6: failed to copy: httpReadSeeker: failed open: unexpected status code https://registry-1.docker.io/v2/ewjoachim/python-coverage-comment-action-base/manifests/sha256:900716dbf7ec02e55775d7ddb5f2d66ee96e53f403e3364b6b85c59a691ee44d: 429 Too Many Requests - Server message: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit
2024-10-14T16:27:11.1513045Z ##[warning]Docker build failed with exit code 1, back off 4.022 seconds before retry.
2024-10-14T16:27:15.1751212Z ##[command]/usr/bin/docker build -t a3a522:fdfacc91aafc4dbcb7939a4e03e0b6fc -f "/home/runner/work/_actions/py-cov-action/python-coverage-comment-action/v3/Dockerfile" "/home/runner/work/_actions/py-cov-action/python-coverage-comment-action/v3"
2024-10-14T16:27:15.4651455Z #0 building with "default" instance using docker driver
2024-10-14T16:27:15.4660598Z 
2024-10-14T16:27:15.4661006Z #1 [internal] load build definition from Dockerfile
2024-10-14T16:27:15.4661970Z #1 transferring dockerfile: 245B done
2024-10-14T16:27:15.4662758Z #1 DONE 0.0s
2024-10-14T16:27:15.4663111Z 
2024-10-14T16:27:15.4663834Z #2 [internal] load metadata for docker.io/ewjoachim/python-coverage-comment-action-base:v6
2024-10-14T16:27:15.5261748Z #2 ERROR: failed to copy: httpReadSeeker: failed open: unexpected status code https://registry-1.docker.io/v2/ewjoachim/python-coverage-comment-action-base/manifests/sha256:900716dbf7ec02e55775d7ddb5f2d66ee96e53f403e3364b6b85c59a691ee44d: 429 Too Many Requests - Server message: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit
2024-10-14T16:27:15.5346406Z ------
2024-10-14T16:27:15.5351805Z  > [internal] load metadata for docker.io/ewjoachim/python-coverage-comment-action-base:v6:
2024-10-14T16:27:15.5353271Z ------
2024-10-14T16:27:15.5360022Z Dockerfile:2
2024-10-14T16:27:15.5361111Z --------------------
2024-10-14T16:27:15.5363142Z    1 |     # See Dockerfile.build for instructions on bumping this.
2024-10-14T16:27:15.5364687Z    2 | >>> FROM ewjoachim/python-coverage-comment-action-base:v6
2024-10-14T16:27:15.5365845Z    3 |     
2024-10-14T16:27:15.5370975Z    4 |     COPY coverage_comment ./coverage_comment
2024-10-14T16:27:15.5376230Z --------------------
2024-10-14T16:27:15.5383499Z ERROR: failed to solve: ewjoachim/python-coverage-comment-action-base:v6: failed to resolve source metadata for docker.io/ewjoachim/python-coverage-comment-action-base:v6: failed to copy: httpReadSeeker: failed open: unexpected status code https://registry-1.docker.io/v2/ewjoachim/python-coverage-comment-action-base/manifests/sha256:900716dbf7ec02e55775d7ddb5f2d66ee96e53f403e3364b6b85c59a691ee44d: 429 Too Many Requests - Server message: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit
2024-10-14T16:27:15.5399733Z ##[warning]Docker build failed with exit code 1, back off 3.263 seconds before retry.
2024-10-14T16:27:18.8020027Z ##[command]/usr/bin/docker build -t a3a522:fdfacc91aafc4dbcb7939a4e03e0b6fc -f "/home/runner/work/_actions/py-cov-action/python-coverage-comment-action/v3/Dockerfile" "/home/runner/work/_actions/py-cov-action/python-coverage-comment-action/v3"
2024-10-14T16:27:19.0979860Z #0 building with "default" instance using docker driver
2024-10-14T16:27:19.0980565Z 
2024-10-14T16:27:19.0980891Z #1 [internal] load build definition from Dockerfile
2024-10-14T16:27:19.0981815Z #1 transferring dockerfile: 245B done
2024-10-14T16:27:19.0982488Z #1 DONE 0.0s
2024-10-14T16:27:19.0982793Z 
2024-10-14T16:27:19.0983489Z #2 [internal] load metadata for docker.io/ewjoachim/python-coverage-comment-action-base:v6
2024-10-14T16:27:19.1643371Z #2 ERROR: failed to copy: httpReadSeeker: failed open: unexpected status code https://registry-1.docker.io/v2/ewjoachim/python-coverage-comment-action-base/manifests/sha256:900716dbf7ec02e55775d7ddb5f2d66ee96e53f403e3364b6b85c59a691ee44d: 429 Too Many Requests - Server message: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit
2024-10-14T16:27:19.1723041Z ------
2024-10-14T16:27:19.1725876Z  > [internal] load metadata for docker.io/ewjoachim/python-coverage-comment-action-base:v6:
2024-10-14T16:27:19.1727027Z ------
2024-10-14T16:27:19.1739407Z Dockerfile:2
2024-10-14T16:27:19.1740556Z --------------------
2024-10-14T16:27:19.1741905Z    1 |     # See Dockerfile.build for instructions on bumping this.
2024-10-14T16:27:19.1743407Z    2 | >>> FROM ewjoachim/python-coverage-comment-action-base:v6
2024-10-14T16:27:19.1744860Z    3 |     
2024-10-14T16:27:19.1745868Z    4 |     COPY coverage_comment ./coverage_comment
2024-10-14T16:27:19.1747073Z --------------------
2024-10-14T16:27:19.1752880Z ERROR: failed to solve: ewjoachim/python-coverage-comment-action-base:v6: failed to resolve source metadata for docker.io/ewjoachim/python-coverage-comment-action-base:v6: failed to copy: httpReadSeeker: failed open: unexpected status code https://registry-1.docker.io/v2/ewjoachim/python-coverage-comment-action-base/manifests/sha256:900716dbf7ec02e55775d7ddb5f2d66ee96e53f403e3364b6b85c59a691ee44d: 429 Too Many Requests - Server message: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit

@ellisvalentiner
Copy link
Contributor

We are experiencing the same problem. Additionally since action.yml specifies image: Dockerfile I am seeing the image is build every time.

@ewjoachim
Copy link
Member

ewjoachim commented Oct 21, 2024

Hey,

I'm not opposed to the change, but never had the change to dive into this. Anyone wants to make a PR?

Additionally since action.yml specifies image: Dockerfile I am seeing the image is build every time.

This is intentional. At first we pushed the complete image at every new version, and used it as-is. It made it much harder to test before publishing, or to use a fork or anything. What we do now is pull a base image, on top of which we'll update dependencies but only if they need to be updated (the lockfile changed), so in about 100% of the cases it's very fast, and then we ADD files which is almost instantaneous. I believe the building of the image is extremely fast every time, and much more flexible than what pulling an image would be. Note that we're regularly updating the abse image too to ensure the building step stays fast. If you see anything that doesn't match this, please send it my way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants