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

Login to Docker Hub before pulling images #218

Closed

Conversation

jsf9k
Copy link
Member

@jsf9k jsf9k commented Jan 28, 2025

🗣 Description

This pull request modifies the build.yml workflow to login to Docker Hub before performing any action that could cause Docker images to be pulled.

Caution

This PR was created on top of #217 and therefore #217 must be merged before this PR.

💭 Motivation and context

This reduces the likelihood of being rate-limited when pulling Docker images from Docker Hub.

🧪 Testing

All automated tests pass.

✅ Pre-approval checklist

  • This PR has an informative and human-readable title.
  • Changes are limited to a single goal - eschew scope creep!
  • All relevant type-of-change labels have been added.
  • I have read the CONTRIBUTING document.
  • These code changes follow cisagov code standards.
  • All new and existing tests pass.

This is required as of Molecule 25.2.0.  Also pin Molecule to 25.2.0
or greater since this is a breaking change.
@jsf9k jsf9k added improvement This issue or pull request will add or improve functionality, maintainability, or ease of use github-actions Pull requests that update GitHub Actions code labels Jan 28, 2025
@jsf9k jsf9k self-assigned this Jan 28, 2025
We are less likely to hit rate limiting if we log into Docker Hub
before pulling images.
@jsf9k jsf9k force-pushed the improvement/use-docker-credentials-when-pulling-images branch from 5d1265b to b53d129 Compare January 28, 2025 16:15
@jsf9k
Copy link
Member Author

jsf9k commented Jan 28, 2025

This change appears to make us hit rate limiting even faster. Looking here we see that authenticated users are allowed 40 pulls per hour, while unauthenticated users are allowed 10 pulls per hour per IP. This is probably why.

@jsf9k jsf9k closed this Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
github-actions Pull requests that update GitHub Actions code improvement This issue or pull request will add or improve functionality, maintainability, or ease of use
Projects
Development

Successfully merging this pull request may close these issues.

1 participant