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

[REQUEST] Make docker build action faster #186

Open
3 tasks done
bdashore3 opened this issue Sep 5, 2024 · 4 comments
Open
3 tasks done

[REQUEST] Make docker build action faster #186

bdashore3 opened this issue Sep 5, 2024 · 4 comments

Comments

@bdashore3
Copy link
Member

Problem

The docker action doesn't cache anything when building. This causes the build times to be over 10 minutes for every push.

Solution

Use an action to cache the intermediate build steps.

Alternatives

No response

Explanation

Doing this makes the image build build faster. This most likely requires a third-party build step.

Examples

No response

Additional context

No response

Acknowledgements

  • I have looked for similar requests before submitting this one.
  • I understand that the developers have lives and my issue will be answered when possible.
  • I understand the developers of this program are human, and I will make my requests politely.
@bdashore3 bdashore3 changed the title [REQUEST] [REQUEST] Make docker build action faster Sep 5, 2024
@SecretiveShell
Copy link
Contributor

one of the biggest things slowing the build is the fact that the .dockerignore file has been moved to the docker folder, meaning that the entire git history and a bunch of other stuff not needed is copied into the container. running git mv on the file would probably cut off a minute or two from the build and reduce the overall file size

@bdashore3
Copy link
Member Author

Yep, merged that in from your PR. But the most important thing to significantly cut down on build times is to have a cache of some sort with actions. There's probably something out there.

@SecretiveShell
Copy link
Contributor

https://docs.docker.com/build/cache/backends/gha/ seems to be a configuration option for the system we already use. @AmgadHasan can you provide any insights on this?

@AmgadHasan
Copy link
Contributor

https://docs.docker.com/build/cache/backends/gha/ seems to be a configuration option for the system we already use. @AmgadHasan can you provide any insights on this?

There is a cache size limit of 10 GB per repo. TabbyAPI image is ~ 5GB in size so the cache limit will be reached quickly.

https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/caching-dependencies-to-speed-up-workflows#usage-limits-and-eviction-policy

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

No branches or pull requests

3 participants