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

Docker image cache useage #4431

Open
s4mur4i opened this issue Dec 27, 2024 · 4 comments
Open

Docker image cache useage #4431

s4mur4i opened this issue Dec 27, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@s4mur4i
Copy link

s4mur4i commented Dec 27, 2024

Is your feature request related to a problem? Please describe.
Megalinter images are quite big, and need to be pulled with multiple PR's in our github actions. We wanted to evaluate using pull through cache images to cache images locally, and then we don't need to go to internet to pull images, but actions doesn't allow using image overrides

Describe the solution you'd like
We could have an argument on actions, with the default value being the current image, but we could set it to point to pull through cache image

Describe alternatives you've considered
We tried evaluating setting a proxy to catch requests and proxy them, but we have multiple environments, and setting up every the proxies was to much, and we didn't feel like a good direction.

@s4mur4i s4mur4i added the enhancement New feature or request label Dec 27, 2024
@nvuillam
Copy link
Member

nvuillam commented Jan 6, 2025

Did you try MegaLinter flavors ? They are already lighter -> https://megalinter.io/latest/flavors/

If you already have a cached docker images management, you can build a custom workflow that would use mega-linter-runner , where you can send the name of the image to use -> https://megalinter.io/latest/mega-linter-runner/#usage

@s4mur4i
Copy link
Author

s4mur4i commented Jan 7, 2025

Yes, I know flavors.
Those images are also are quite large. terrafrom flavor for example is 1GB+.

Management of custom workflow would be worst outcome, since we would need to maintain any updates and changes.
I think adding an argument that defaults to upstream but can be changed with workflows to use any cached image would be beneficial for others.

@nvuillam
Copy link
Member

nvuillam commented Jan 9, 2025

@s4mur4i do you have ideas about how we could do that with Github Actions ?

@echoix
Copy link
Collaborator

echoix commented Jan 10, 2025

Downloading from cache or downloading from ghcr.io: I don't think one would be faster on GitHub hosted runners. But with cache there is less parallelism and extracting must be done for the tar, then tar copied again for importing into docker. It's something you'd need to mesure in your use cases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants